Solved

Hide macros?

Posted on 2006-11-29
3
359 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
Comment Utility
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)
Comment Utility
BTW - you will also still be able to call them as you have been.
0
 
LVL 35

Expert Comment

by:mvidas
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

10 Experts available now in Live!

Get 1:1 Help Now