mammaleoni
New Member
- Joined
- Dec 12, 2014
- Messages
- 1
How do I use a date selected from a calender to match to a portion of the file name which I need to import daily as the source of my macro?
I am very new to VB , I have recorded a macro to open a file from a shared folder and then do various actions from there, which are working fine on the day , however i'd like to have a calender on a form and select the date from the calender and then within the macro it needs to match this selected date to the file containing that date as a part of the file name?
Sub Macro2()
'
' Macro2 Macro
'
'
ChDir "R:\CASDM\Collateral\Collateral Register"
Workbooks.Open Filename:= _
"R:\CASDM\Collateral\Collateral Register\Collateral Register 2014-12-12-01-18-54.XLS"
End Sub
I am very new to VB , I have recorded a macro to open a file from a shared folder and then do various actions from there, which are working fine on the day , however i'd like to have a calender on a form and select the date from the calender and then within the macro it needs to match this selected date to the file containing that date as a part of the file name?
Sub Macro2()
'
' Macro2 Macro
'
'
ChDir "R:\CASDM\Collateral\Collateral Register"
Workbooks.Open Filename:= _
"R:\CASDM\Collateral\Collateral Register\Collateral Register 2014-12-12-01-18-54.XLS"
End Sub