Thread
:
Hide Macro's
View Single Post
#
1
Posted to microsoft.public.excel.programming
Trevor Shuttleworth
external usenet poster
Posts: 1,089
Hide Macro's
There is often a variety of solutions. If it works for you, that's good
enough.
Regards
Trevor
"Ardy" wrote in message
ps.com...
thesquirrel:
Thank you for the solution, I have implemented this in most of my code
and modules, it works great. The Private Sub() is also a solution but
it is too late in hte game for this mini app that I am working on, +
Since I am not a true programmer it brings abt a lot of complication in
my current worksheet. I like to thank both for offering solutions to
this problem of mine.
Ardy
wrote:
I have used your way for a long time John and to good success. I found
early on in my learning that items with paramaters don't appear in the
macro window.
I use something like this...
Public Sub Test(x as byte)
<code here
End Sub
and I call it like this...
<code here
Dim x as byte
test x
<code here
I use it and will continue using it because it works :)
theSquirrel
John Coleman wrote:
Forget my post - Trevor's approach is the way to go.
John Coleman wrote:
There might be some way, but I don't know it. A workaround is to
exploit the fact that subs with parameters do not appear in the macro
list. For example,
if you have
Sub Greet()
msgbox "hi"
End Sub
Sub SendGreeting()
Greet
End Sub
then both Greet and SendGreeting will be visible in the macro list,
even if you intend Greeting() to be called by the user and Greet() a
helping sub you *don't* want them to invoke. But - if you replace the
definition of Greet by
Sub Greet(Optional dummy = 0)
MsgBox "Hi"
End Sub
then everything works as before but Greet() no longer appears in the
list.
Hope that helps
-John Coleman
Ardy wrote:
Hide Macro's
Is there a possibility to hide created macros within macro window
from
the users? This is to prevent users to execute out of sequence
code.
Ardy
Reply With Quote
Trevor Shuttleworth
View Public Profile
Find all posts by Trevor Shuttleworth