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

J

Jeremy

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
 
D

Don Guillett

Put this at the top of your module

Option private module
or
private sub instead of just sub
 
M

Mike H

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.
 
G

Gord Dibben

Lock the project from viewing in VBE>VBAProject Properties


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top