ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Keep macros from being ran under the tools option in the menu bar (https://www.excelbanter.com/excel-discussion-misc-queries/261941-keep-macros-being-ran-under-tools-option-menu-bar.html)

Jeremy

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



Don Guillett[_2_]

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




Mike H

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



Gord Dibben

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




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com