lookingforK
Registered User.
- Local time
- Today, 09:49
- Joined
- Aug 29, 2012
- Messages
- 48
How to write On Error code for opening a file?
Hi,
I want to use On Error code for opening a file.
Something like:
How to write the code for the part {find [Template.xlsx]}? :banghead:
Thank you in advance.
Hi,
I want to use On Error code for opening a file.
Something like:
Code:
On Error GoTo findtemplate_error
Set wkbDest = xl.Workbooks.Open(strReportPath & "\Template.xlsx")
findtemplate_error:
If [COLOR=red]{find [Template.xlsx]}[/COLOR] Then {GoTo ...[I]continue[/I]}
Else
MsgBox "[Template.xlsx] cannot be found under this folder. Please try a different path. "
Exit Sub
End If
How to write the code for the part {find [Template.xlsx]}? :banghead:
Thank you in advance.
Last edited: