PDA

View Full Version : [SOLVED] Disable Macros



Philcjr
07-21-2005, 06:53 AM
All,

I am currently working on some code in which "file (1)" will open another excel file "file (2)" and copy its contents from multiple worksheets and past the data onto one sheet in "file (1)".

I need to know how to "disable" the macros when "File(2)" opens from the execution of the code in "File(1)"

Thanks,
Phil

Justinlabenne
07-21-2005, 06:58 AM
Add


Application.EnableEvents = False


before your line of code that opens the Workbook.
At the procedure's end, reset it to True.

Philcjr
07-21-2005, 07:10 AM
Justine,

Thanks... works perfect.