PC Review


Reply
Thread Tools Rate Thread

Deactivate automatic macros on import

 
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      11th Jun 2007
Hi All......
I am trying to open a second Excel file and retrieve a copy of one of the
worksheets. I've done this many times successfully, with other files, but
this one has automatic macros attached to the sheet and workbook modules
which are messing things up by trying to engage. How might I be able to open
this book and copy a sheet from it to another workbook, and in so doing,
disable all the sheet and workbook macros?.....and circumvent the "workbook
is in use, do you want to open read-only" message.

TIA
Vaya con Dios,
Chuck, CABGx3


 
Reply With Quote
 
 
 
 
Dave Miller
Guest
Posts: n/a
 
      11th Jun 2007
Disable events before you open the workbook:

Application.EnableEvents = False

Remember to enable again after you are done with the sheet.

Regards,
David Miller

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      11th Jun 2007
Thanks David.....but I still can't get past the "file is in use, open as
read-only?" message.

Vaya con Dios,
Chuck, CABGx3



"Dave Miller" wrote:

> Disable events before you open the workbook:
>
> Application.EnableEvents = False
>
> Remember to enable again after you are done with the sheet.
>
> Regards,
> David Miller
>
>

 
Reply With Quote
 
=?Utf-8?B?Q0xS?=
Guest
Posts: n/a
 
      11th Jun 2007
To close the loop............I wasn't able to get there with any sort of a
Copy and Paste procedure, but was finally able to get what I needed by using
a macro to run a custom MSQuery.

Vaya con Dios,
Chuck, CABGx3

"CLR" wrote:

> Hi All......
> I am trying to open a second Excel file and retrieve a copy of one of the
> worksheets. I've done this many times successfully, with other files, but
> this one has automatic macros attached to the sheet and workbook modules
> which are messing things up by trying to engage. How might I be able to open
> this book and copy a sheet from it to another workbook, and in so doing,
> disable all the sheet and workbook macros?.....and circumvent the "workbook
> is in use, do you want to open read-only" message.
>
> TIA
> Vaya con Dios,
> Chuck, CABGx3
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deactivate macros but reactivate again once another macro is run Ber Microsoft Excel Programming 2 26th Apr 2010 12:43 PM
"Shared Workbook" seems to deactivate features like macros =?Utf-8?B?U3RldmU=?= Microsoft Excel Misc 3 1st May 2007 05:11 PM
Re: How to deactivate the external queries that are used to import dat NickHK Microsoft Excel Programming 0 4th Jan 2007 02:04 AM
How to deactivate XP automatic popup legends Alvaro de la Ossa Windows XP Accessibility 1 12th May 2004 11:43 AM
deactivate automatic shutdown Marius Windows XP General 2 15th Jul 2003 04:01 PM


Features
 

Advertising
 

Newsgroups
 


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