LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Problems with Wildcards and VBA

I am having problems with building paths from my variables. I want to use the
wildcard "*" and have it substitute characters between 2 known text strings.
ie. using it to create dynamic directory changing based upon the month of the
year. I am currently using "DateRef = XLMonth & "/" & "*" & "/2005"" with
success, but I cannot get "LeFldr = Left(LeRef, 4) & "_" & "*" & ".xls"" to
work. I simply get the following result . . . "7014_*.xls"

My code is as follows:
Dim LeRef As String
Dim LePth As String
Dim Lefldr as String
Dim DateRef as String
XlMonth as String
DateRef = XLMonth & "/" & "*" & "/2005"
LeFldr = Left(LeRef, 4) & "_" & "*" & ".xls"

Results in "\\v1sacpdofc2\cpdprojects\CIS Financials\QLE\LE\F05
LEs\7014_*.xls\Jan 05\7014_R1B F05 LE_CIS x.xls"

 
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
Wildcards in RTD JKC Excel Discussion (Misc queries) 0 February 3rd 06 07:35 PM
Problems with SUMIF function and Wildcards (* and ?) J1J Excel Worksheet Functions 4 June 27th 05 04:25 PM
Wildcards properties Excel Programming 3 May 19th 04 05:04 PM
Wildcards HELP ME PLEASE! Excel Programming 3 December 3rd 03 01:22 PM
Wildcards john Petty Excel Programming 3 August 22nd 03 08:57 PM


All times are GMT +1. The time now is 01:29 PM.

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

About Us

"It's about Microsoft Excel"