View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default 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