Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wildcards in workbook name
Hi all,
Just a small matter in that I want to select a workbook in order for a macro in another workbook to collect the necessary variables. The name of the file will change month on month but will always start with "COM". I guessing that wildcards will be needed in a code to select a workbook with "COM" in it's title but can anyone provide tha code? I need this to try and limit as much as possible user input to run the macro Many thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Wildcards in workbook name
A different approach. When you open the file set that workbook to a workbook
object, and then use that later in the code. Set myWb = Workbooks.Open("C:\MyTest.xls") '.... myVar1 = myWB.Worksheets(1).Range("A1") 'etc. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "DCHK" wrote in message ... Hi all, Just a small matter in that I want to select a workbook in order for a macro in another workbook to collect the necessary variables. The name of the file will change month on month but will always start with "COM". I guessing that wildcards will be needed in a code to select a workbook with "COM" in it's title but can anyone provide tha code? I need this to try and limit as much as possible user input to run the macro Many thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wildcards and if | Excel Worksheet Functions | |||
Wildcards in VBA | Excel Programming | |||
Wildcards in RTD | Excel Discussion (Misc queries) | |||
wildcards in vba | Excel Discussion (Misc queries) | |||
Wildcards in other workbook cell refrence? | Excel Worksheet Functions |