Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default application.enableEvents

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


--
jeffP



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default application.enableEvents

Jeff,

Put EnableEvents = False BEFORE opening the workbook.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"jeffP" wrote in message
...
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


--
jeffP





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.EnableEvents DCPan Excel Worksheet Functions 3 October 18th 08 05:46 AM
application.EnableEvents nc Excel Discussion (Misc queries) 1 September 28th 05 04:00 PM
Application.EnableEvents Terry Excel Programming 2 April 2nd 04 08:25 PM
Stopping the use of enableevents Steven Revell[_3_] Excel Programming 3 November 21st 03 07:16 AM
EnableEvents and DisplayAlerts problems Derek Gadd Excel Programming 3 November 4th 03 01:35 PM


All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"