Urgent: How to prevent opening Excel file that contains macros

  • Thread starter Thread starter kvenku
  • Start date Start date
K

kvenku

I have a Excel file which inturn create a toolbar with new icons when
open the excel file. I wrote a function to open a excel file for impor
and export.

I need to avoid opening a excel file that contains macros.. how to d
this

Thanks

Venkates
 
Perhaps you only want to supress the running of the workbook_Open macro

Application.EnableEvents = False
Workbooks.Open "C:\Myfolder\MyfilewithWorkbook_OpenMacro.xls"
Application.EnableEvents = True

or if it has other events like selectionchange or change you can leave
events off until you are through processing the workbook.
 
You could go to Tools - Macros - Security and set security
to medium and say to enabling when sheet is loaded
 
Back
Top