Workingstiff
New Member
- Joined
- Jan 24, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hello, I have a sheet in a file which I would like to update automatically with changes. the problem is the file name changes everyday in the format of "AAAA01232022" to "AAAA01242022"
so the change is in "mmddyyyy" format and progressing by one each day. Occasionally there are days the file name doesn't change( usually holidays). I tried using this but it will only open the file. Anyone have any ideas?
Sub getfile()
Dim FName As String
Dim FPath As String
Dim wb1 As ThisWorkbook
FPath = "Z:\Shared\Teams\Callidus Project\Dashboards\"
FName = "Production Dashboard Template - Daily Client Copy_" & Format(Date, "mmddyyyy") & ".xlsm"
Workbooks.Open Filename:=FPath & FName
Set wb1 = ActiveWorkbook
'...
End Sub
so the change is in "mmddyyyy" format and progressing by one each day. Occasionally there are days the file name doesn't change( usually holidays). I tried using this but it will only open the file. Anyone have any ideas?
Sub getfile()
Dim FName As String
Dim FPath As String
Dim wb1 As ThisWorkbook
FPath = "Z:\Shared\Teams\Callidus Project\Dashboards\"
FName = "Production Dashboard Template - Daily Client Copy_" & Format(Date, "mmddyyyy") & ".xlsm"
Workbooks.Open Filename:=FPath & FName
Set wb1 = ActiveWorkbook
'...
End Sub