Solved

Hide macros?

Posted on 2006-11-29
3
363 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

770 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