application.enableEvents

  • Thread starter Thread starter jeffP
  • Start date Start date
J

jeffP

Hi all,
I'm trying to have a macro copy/pastespecial a cell from another workbook.
Simple enough but I have a userform that shows when the workbook opens so I
have to close the form to continue the macro. I "thought"
application.enableevents=false would stop this userform from opening but
obviously I'm wrong.
Any help is always appreciated.

Workbooks.Open FileName:="C:\Report1.xls"

Application.EnableEvents = False

Sheets("A").Select
Range("D5").Select
Selection.Copy
yaddayaddayadda
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top