Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Is it possible to use wild card characters or variables with Excel macros?  (Read 2320 times)

0 Members and 1 Guest are viewing this topic.

mcgriff1969

    Topic Starter


    Rookie

    Can you use wild cards or variables in a macro like you would in a batch script based on user input?  For example, a dialog box requesting the user to enter a number or date and then opening all files on the desktop containing that number?

    quaxo



      Guru
    • Thanked: 127
      • Yes
    • Computer: Specs
    • Experience: Guru
    • OS: Windows 11
    Re: Is it possible to use wild card characters or variables with Excel macros?
    « Reply #1 on: September 30, 2010, 01:11:36 AM »
    There's a lot you can do with formulas and macros in Excel. However, the example you are giving is not one of them.

    If you could restate the question a little more clearly, like exactly which version of Excel you are using and exactly what are you trying to accomplish?

    mcgriff1969

      Topic Starter


      Rookie

      Re: Is it possible to use wild card characters or variables with Excel macros?
      « Reply #2 on: September 30, 2010, 01:23:52 PM »
      I am using Excel 2003.  I have several Excel files named with an ID number and date.  I want to combine all the files in 1 table.  I will have many groups of files with different ID numbers with the same date.

      Another question I have is this.  I have written several macros.  They all have various steps within them.  Can a particular step, say deleting a column, be skipped over based on the content of a cell in the file and have the macro continue with the next procedure?  Do I need to label each procedure like this [some label]:.  I understand the "On Error Go TO..." Would what I want to do use the same logic?

      Any thoughts?