Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
wildcard substitution in formula
I have the following worksheet name that is used to identify the file ie: "If
xlApp.Workbooks("CPCT Dec CDART.xls")" I would like to be able to use a wildcard ("*") o0perator in place of the word Dec, so that I can open the workbook whatever month it is, since there is always only one file in the folder and its name only changes based upon the month. How should I approach this. Jeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
wildcard substitution in formula
Hi Jeff,
Instead of wildcard try: Dim sFilename As String sFilename = "CPCT " & Format(Date, "mmm") & " CDART.xls" also take a look at the 'Like' function Regards, Peter T "Jeff" wrote in message ... I have the following worksheet name that is used to identify the file ie: "If xlApp.Workbooks("CPCT Dec CDART.xls")" I would like to be able to use a wildcard ("*") o0perator in place of the word Dec, so that I can open the workbook whatever month it is, since there is always only one file in the folder and its name only changes based upon the month. How should I approach this. Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compound Formula for Substitution | Excel Discussion (Misc queries) | |||
Help with parameter substitution in formula (&value), vbScript | Excel Worksheet Functions | |||
variable substitution in a formula | Excel Discussion (Misc queries) | |||
Cell Formula substitution. | Excel Discussion (Misc queries) | |||
why does ON = Ambiguous in substitution formula? | Excel Worksheet Functions |