Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compound Formula for Substitution Chris Excel Discussion (Misc queries) 3 January 7th 10 05:04 AM
Help with parameter substitution in formula (&value), vbScript circuit_breaker Excel Worksheet Functions 1 September 10th 09 03:02 PM
variable substitution in a formula NHRunner Excel Discussion (Misc queries) 5 May 11th 07 01:56 PM
Cell Formula substitution. id3372 Excel Discussion (Misc queries) 3 July 8th 06 04:36 PM
why does ON = Ambiguous in substitution formula? waladd Excel Worksheet Functions 5 May 6th 05 05:29 PM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"