PC Review


Reply
Thread Tools Rate Thread

disabling automatic startup of macro in vba

 
 
future_vba_expert
Guest
Posts: n/a
 
      27th Feb 2009
The MSDN site says that you can kill the auto start up of a macro if you hold
down the shift key while starting up the excel spreadsheet. I found that this
did not work for me. I have the macro under 'workbook_open', which I think
would apply. I sometimes have to edit the vba code, and would prefer that the
macro does not run at all at that time. The rest of the time we want it to
run without any prompts or messages (except for fata errors, of course).
Thanks for any help you can provide.
--
future_vba_expert
 
Reply With Quote
 
 
 
 
Gary Brown
Guest
Posts: n/a
 
      27th Feb 2009
The MSDN is correct.
Since you say that it isn't working for you, when you want to edit the VBA
code, try opening Excel, put Security to HIGH, then open the workbook.
Security will not allow the macro to run. Make your changes, save the
workbook and change your Security back to Middle or Low.

If you've 'OK'd' a Digital Signature, so that the Macro Security warning
doesn't even show, get into the VBE and delete the Digital Signature, re-open
the workbook, do your thing, re-assign the Digital Signature and save.
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"future_vba_expert" wrote:

> The MSDN site says that you can kill the auto start up of a macro if you hold
> down the shift key while starting up the excel spreadsheet. I found that this
> did not work for me. I have the macro under 'workbook_open', which I think
> would apply. I sometimes have to edit the vba code, and would prefer that the
> macro does not run at all at that time. The rest of the time we want it to
> run without any prompts or messages (except for fata errors, of course).
> Thanks for any help you can provide.
> --
> future_vba_expert

 
Reply With Quote
 
future_vba_expert
Guest
Posts: n/a
 
      27th Feb 2009
Thanks for your reply, Gary.

I did not see anything on the MSDN about security levels when using the
shift key on the startup. I was hoping that I would not have to change the
security level to cause the macro not to run. We normally keep the security
low for trusted apps that we run in batch mode. However, I could up my
security prior to editing, to force the macro to not run.

But I would also like to find out why the shift key approach is not working
for me.

--
future_vba_expert


"Gary Brown" wrote:

> The MSDN is correct.
> Since you say that it isn't working for you, when you want to edit the VBA
> code, try opening Excel, put Security to HIGH, then open the workbook.
> Security will not allow the macro to run. Make your changes, save the
> workbook and change your Security back to Middle or Low.
>
> If you've 'OK'd' a Digital Signature, so that the Macro Security warning
> doesn't even show, get into the VBE and delete the Digital Signature, re-open
> the workbook, do your thing, re-assign the Digital Signature and save.
> --
> Hope this helps.
> If it does, please click the Yes button.
> Thanks in advance for your feedback.
> Gary Brown
>
>
>
> "future_vba_expert" wrote:
>
> > The MSDN site says that you can kill the auto start up of a macro if you hold
> > down the shift key while starting up the excel spreadsheet. I found that this
> > did not work for me. I have the macro under 'workbook_open', which I think
> > would apply. I sometimes have to edit the vba code, and would prefer that the
> > macro does not run at all at that time. The rest of the time we want it to
> > run without any prompts or messages (except for fata errors, of course).
> > Thanks for any help you can provide.
> > --
> > future_vba_expert

 
Reply With Quote
 
future_vba_expert
Guest
Posts: n/a
 
      2nd Mar 2009
I found the answer to my own question, after some more research (found a
related discussion on mrexcel.com). The workbook_open is not disabled by
holding the shift key while starting Excel. However, the auto_open is
disabled. So all have to do is put my startup logic in an auto_open macro
(which goes in a regular module, not under ThisWorkbook)), and then I can run
or not run by holding down shift or not holding down shift. Hope this helps
anyone else who has a similar need.
--
future_vba_expert


"future_vba_expert" wrote:

> The MSDN site says that you can kill the auto start up of a macro if you hold
> down the shift key while starting up the excel spreadsheet. I found that this
> did not work for me. I have the macro under 'workbook_open', which I think
> would apply. I sometimes have to edit the vba code, and would prefer that the
> macro does not run at all at that time. The rest of the time we want it to
> run without any prompts or messages (except for fata errors, of course).
> Thanks for any help you can provide.
> --
> future_vba_expert

 
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
Automatic Startup for a Macro =?Utf-8?B?Z3NwaXJyaXNvbg==?= Microsoft Excel Misc 5 5th Jan 2010 06:07 PM
automatic updates automatic disable upon startup crapit Windows XP Basics 2 20th Jun 2007 06:49 AM
disabling programs from automatic startup sarah burris Windows XP Customization 1 21st Feb 2004 10:08 PM
Disabling automatic log off Tyrell Windows XP General 3 9th Nov 2003 03:11 PM
Automatic startup of an excel macro Quist Microsoft Excel Programming 3 3rd Oct 2003 04:31 PM


Features
 

Advertising
 

Newsgroups
 


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