Solved

Hide macros?

Posted on 2006-11-29
3
360 Views
Last Modified: 2010-04-30
If I have 5 macros, and then have one master macro that runs the other five, can I hide the five from the end user?

Example

Macro1
Macro2
Macro3
Macro4
Macro5
FinalMacro

FinalMacro runs Macros 1 through 5 in order. I want the user to only see FinalMacro, is this possible?
0
Comment
Question by:tiehaze
  • 2
3 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 18041747
Hi tiehaze,

For your 5 other macros, add an optional argument for each. Eg....

    Sub Macro1(Optional Str As String = "")
    .....
    End Sub

This will prevent them being seen in the macro list and will not affect their operation.

Regards,

Wayne
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 18041753
BTW - you will also still be able to call them as you have been.
0
 
LVL 35

Expert Comment

by:mvidas
ID: 18045886
Wayne's method will work easily for you and he deserves the points, but another way would be to put "Private " before Sub, assuming macros 1-5 are in the same module as FinalMacro.
Though I would change his "Str" variable to a random name, as Str is a VB function :)
Matt
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now