Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Bypass Workbook_Open when opening a workbook with VBA

Hi there,

How can I bypass the Workbook_Open event when opening a workbook with
VBA.

Holding down the shift key does this when opening it manually. The
open event simply brings up a message box which normally a user would
just click OK.

I have tried Sendkeys, but this does not work. Can't find anything in
the help files.

Any suggestions welcome.

Cheers

Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Bypass Workbook_Open when opening a workbook with VBA

Application.EnableEvents = False
workbooks.Open "C:\Myforlder\MYfile.xls"
Application.EnableEvents = True

--
Regards,
Tom Ogilvy

"Paul" wrote in message
om...
Hi there,

How can I bypass the Workbook_Open event when opening a workbook with
VBA.

Holding down the shift key does this when opening it manually. The
open event simply brings up a message box which normally a user would
just click OK.

I have tried Sendkeys, but this does not work. Can't find anything in
the help files.

Any suggestions welcome.

Cheers

Paul



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Bypass Workbook_Open when opening a workbook with VBA

Thanks Tom,

Obvious when you see it.

Have a great day. Cheers. Paul

"Tom Ogilvy" wrote in message ...
Application.EnableEvents = False
workbooks.Open "C:\Myforlder\MYfile.xls"
Application.EnableEvents = True

--
Regards,
Tom Ogilvy

"Paul" wrote in message
om...
Hi there,

How can I bypass the Workbook_Open event when opening a workbook with
VBA.

Holding down the shift key does this when opening it manually. The
open event simply brings up a message box which normally a user would
just click OK.

I have tried Sendkeys, but this does not work. Can't find anything in
the help files.

Any suggestions welcome.

Cheers

Paul

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
How do I stop blank workbook from opening when opening an existing kjg Excel Discussion (Misc queries) 3 February 12th 10 09:36 PM
link two cell from two workbook bypass password abbas_m19 Excel Discussion (Misc queries) 0 November 21st 07 07:05 AM
excel VBA problem - setting workbook as variable & opening/re-opening safe Excel Programming 1 August 20th 04 12:22 AM
How to make the opening of a workbook conditional upon the opening of another workbook Marcello do Guzman Excel Programming 1 December 16th 03 06:09 AM
How to make opening of workbook conditional of opening of another workbook turk5555[_2_] Excel Programming 2 December 15th 03 11:07 PM


All times are GMT +1. The time now is 05:11 AM.

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"