Solved

Hide macros?

Posted on 2006-11-29
3
369 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 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…

718 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