Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Protects running from VBA, but not from hot key


Macro protects workbook as its last command. It works when I run the macro
from VBA. But when I run the same macro from a hot key, it runs without error
but the workbook is not protected. I'm stumped.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Protects running from VBA, but not from hot key

Please post your code and maybe we can help.
--
HTH,
Barb Reinhardt



"Andyjim" wrote:


Macro protects workbook as its last command. It works when I run the macro
from VBA. But when I run the same macro from a hot key, it runs without error
but the workbook is not protected. I'm stumped.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Protects running from VBA, but not from hot key

Any chance that you open another workbook in your macro?

And does your hotkey include the shift key?

If yes to both, then remove the shift key from the hot key.

If you open a workbook with the shift key held down, then excel thinks you don't
want to run the auto_open or workbook_open procedures.

And since your shortcut key includes the shift key, it's confusing excel and
excel thinks you want to stop.

Andyjim wrote:

Macro protects workbook as its last command. It works when I run the macro
from VBA. But when I run the same macro from a hot key, it runs without error
but the workbook is not protected. I'm stumped.


--

Dave Peterson
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
Can you allow users to copy & paste protects cells shelly Excel Worksheet Functions 0 April 10th 09 05:41 PM
password protects different worksheets n upload on the web Kanika Excel Worksheet Functions 1 August 6th 08 03:28 PM
Macro that password protects a sheet Ryan Excel Discussion (Misc queries) 1 November 10th 05 05:42 PM
How to prompt user to set password that protects their worksheet? cwwolfdog Excel Programming 2 February 10th 05 02:51 PM
Protecting a book protects too much?! StargateFanFromWork Excel Programming 2 July 6th 04 12:52 PM


All times are GMT +1. The time now is 07:47 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"