Hi all, I got Run-time error "Sorry, we couldn't find Inventory_SWK - 080319.xlsx. Is it possible it was moved, renamed or deleted?"
Below is my code:
Dim sFileName As String
Dim lRow As Long
Dim wb As Workbook
sFileName = Dir(ThisWorkbook.Path & "\Inventory_SWK*")
Workbooks.Open (sFileName)
This macro is saved together with the file I want to open which is Inventory_SWK - 080319.xlsx. Not sure why macro found this file but says couldn't find in the error message and refuse to open it.
Below is my code:
Dim sFileName As String
Dim lRow As Long
Dim wb As Workbook
sFileName = Dir(ThisWorkbook.Path & "\Inventory_SWK*")
Workbooks.Open (sFileName)
This macro is saved together with the file I want to open which is Inventory_SWK - 080319.xlsx. Not sure why macro found this file but says couldn't find in the error message and refuse to open it.