Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default 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
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
MACRO's arangoa79 Excel Discussion (Misc queries) 3 May 19th 09 05:48 PM
Macro's are fun Chris Excel Worksheet Functions 0 February 7th 08 06:09 AM
Hide macro's clippan Excel Worksheet Functions 2 April 3rd 07 09:42 PM
Macro's 148steve Excel Discussion (Misc queries) 4 November 14th 06 09:39 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"