G
Guest
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"
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"