OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Thanks in advance for any suggestions as I will give feedback accordingly.
Part of the response to my question has previously been posted, but since I've never used Functions in VBA and I am still new with VBA coding, I need some additional assistance.
https://www.mrexcel.com/forum/excel-questions/1072316-vba-check-if-sheet-exists.html
I would like to check if the following sheet in the external workbook exists, and if not, terminate the program. I only posted the pertinent code.
Part of the response to my question has previously been posted, but since I've never used Functions in VBA and I am still new with VBA coding, I need some additional assistance.
https://www.mrexcel.com/forum/excel-questions/1072316-vba-check-if-sheet-exists.html
I would like to check if the following sheet in the external workbook exists, and if not, terminate the program. I only posted the pertinent code.
Code:
Sub Check_Sheet()
Dim i as Long
For i = 3 to LastRow
'The Path is "DirFolder"
'The File Name is "File_Name"
'If "Invoice Details" does not exist then (how to write this code?)
Exit Sub
EndIf
Next i
End Sub