Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Prevent Workbook_Open macro

Hi everyone,

I am opening one workbook from another using this command:

Workbooks.Open(wbkname)

but when wbkname opens it runs the Workbook_Open subroutine in the
ThisWorkbook section.

Is there a way I can prevent it from running this code?

I am running XP and Excel 2003.
TIA
big t

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Prevent Workbook_Open macro

Hi
not tested but try:
application.enableevents=false
Workbooks.Open(wbkname)
application.enableevents=true

--
Regards
Frank Kabel
Frankfurt, Germany

"big t" schrieb im Newsbeitrag
...
Hi everyone,

I am opening one workbook from another using this command:

Workbooks.Open(wbkname)

but when wbkname opens it runs the Workbook_Open subroutine in the
ThisWorkbook section.

Is there a way I can prevent it from running this code?

I am running XP and Excel 2003.
TIA
big t


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Prevent Workbook_Open macro

Thanks Frank, that worked a treat!

cheers
big t


"Frank Kabel" wrote:

Hi
not tested but try:
application.enableevents=false
Workbooks.Open(wbkname)
application.enableevents=true

--
Regards
Frank Kabel
Frankfurt, Germany

"big t" schrieb im Newsbeitrag
...
Hi everyone,

I am opening one workbook from another using this command:

Workbooks.Open(wbkname)

but when wbkname opens it runs the Workbook_Open subroutine in the
ThisWorkbook section.

Is there a way I can prevent it from running this code?

I am running XP and Excel 2003.
TIA
big t



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
Workbook_Open macro not running mrice Excel Discussion (Misc queries) 2 April 26th 06 06:45 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM
Workbook_Open & Macro James Cox[_2_] Excel Programming 0 July 2nd 04 03:44 PM
Workbook_Open macro created in Excel 97 problems on MAC Dick Kusleika Excel Programming 2 September 8th 03 06:42 PM


All times are GMT +1. The time now is 06:19 PM.

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

About Us

"It's about Microsoft Excel"