Bypass Workbook Open Event

aziz rasul

Active member
Local time
Today, 02:35
Joined
Jun 26, 2000
Messages
1,935
When pressing a command button on a form to open an Excel file, is it possible to prevent the Workbook event from firing up?
 
Try:

Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.EnableEvents = False
objExcel.Workbooks.Open "C:\test.xlsm"
objExcel.EnableEvents = True
 
I didn't realise it would be as simple as that. Many thanks.
 

Users who are viewing this thread

Back
Top Bottom