zombiemaster
Board Regular
- Joined
- Oct 27, 2009
- Messages
- 245
Hi, All...
I am trying to write code that will open a spreadsheet so it can be used for a series of vlookup formulas, but the file name has a date in it that changes as updates are made. I am pretty sure the solution is just to use a wildcard for the date piece of the file name, but I've never used wildcards before and haven't had any luck figuring it out.
When I use the wizard to record opening the file manually, here's the code that comes back:
I need to turn that "11.14.18" date into a wildcard so it will open all the time regardless of which date it's changed to. Any help is appreciated!
Thanks,
~ZM~
I am trying to write code that will open a spreadsheet so it can be used for a series of vlookup formulas, but the file name has a date in it that changes as updates are made. I am pretty sure the solution is just to use a wildcard for the date piece of the file name, but I've never used wildcards before and haven't had any luck figuring it out.
When I use the wizard to record opening the file manually, here's the code that comes back:
Code:
Sub openthefile()
'
' openthefile Macro
'
ChDir "\\ORHPDATNNH039\Data\di\client_services\Department Listings"
Workbooks.Open Filename:= _
"\\ORHPDATNNH039\Data\di\client_services\Department Listings\!Pallm Directory 11.14.18.xlsx" _
, Notify:=False
End Sub
I need to turn that "11.14.18" date into a wildcard so it will open all the time regardless of which date it's changed to. Any help is appreciated!
Thanks,
~ZM~