Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

with a macro open a workbook without the Auto_Open running

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
OlieH - 21 May 2008 16:48 GMT
I wish to open a workbook that has Auto_Open installed.  I merely want to
extract information from a specific cell.  My proglem is that the workbook
when opend will run Auto Open.  Is there a way to prevent the Auto_Open macro
from execuiting?
I appreciate the help.

Olie
Chip Pearson - 21 May 2008 17:01 GMT
Olie,

Hold down the SHIFT key when you open the file and the code won't run.

Signature

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
   Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

>I wish to open a workbook that has Auto_Open installed.  I merely want to
> extract information from a specific cell.  My proglem is that the workbook
[quoted text clipped - 4 lines]
>
> Olie
OlieH - 21 May 2008 17:36 GMT
Chip thanks for the reply.  I am opening the workbook from within a macro in
a different workbook.  I did get the workbook to open without executing the
Auto_Open.  Now my problem is that in the "opened workbook" I have a
before_close event that is triggered, when I tried to close the 2nd workbook.
Any way to prevent the before_close macro from running from within the first
opened workbook?

> Olie,
>
[quoted text clipped - 8 lines]
> >
> > Olie
Chip Pearson - 21 May 2008 18:29 GMT
If you are opening the file via VBA code, the Auto_Open macro won't run, but
the Workbook_Open event will run. You can disable all events (such as
BeforeClose) with code like

Application.EnableEvents = False
' do something
Application.EnableEvents = True

Signature

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
   Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

> Chip thanks for the reply.  I am opening the workbook from within a macro
> in
[quoted text clipped - 21 lines]
>> >
>> > Olie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.