A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Keep macros from being ran under the tools option in the menu bar



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 02:19 PM posted to microsoft.public.excel.misc
jeremy
external usenet poster
 
Posts: 265
Default Keep macros from being ran under the tools option in the menu bar

I have macros that are automated on excell 2003 and I am not wanting users to
view or execute macros from clicking on tools then macro. How would I gray
out this option?


Thank you


  #2  
Old April 20th, 2010, 02:31 PM posted to microsoft.public.excel.misc
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default Keep macros from being ran under the tools option in the menu bar

Put this at the top of your module

Option private module
or
private sub instead of just sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Jeremy" wrote in message
...
I have macros that are automated on excell 2003 and I am not wanting users
to
view or execute macros from clicking on tools then macro. How would I
gray
out this option?


Thank you



  #3  
Old April 20th, 2010, 02:34 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Keep macros from being ran under the tools option in the menu bar

Hi,

You could put this in (say) the workbook open event and set it to TRUE in
workbook close

Private Sub Workbook_Open()
With Application.CommandBars("Worksheet Menu Bar").Controls("&Tools")
.Controls("&Macro").Enabled = False
End With
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Jeremy" wrote:

I have macros that are automated on excell 2003 and I am not wanting users to
view or execute macros from clicking on tools then macro. How would I gray
out this option?


Thank you


  #4  
Old April 20th, 2010, 08:42 PM posted to microsoft.public.excel.misc
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Keep macros from being ran under the tools option in the menu bar

Lock the project from viewing in VBEVBAProject Properties


Gord Dibben MS Excel MVP

On Tue, 20 Apr 2010 06:19:01 -0700, Jeremy
wrote:

I have macros that are automated on excell 2003 and I am not wanting users to
view or execute macros from clicking on tools then macro. How would I gray
out this option?


Thank you


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.