Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Macro not available to execute from this workbook.

Posted on 2008-06-24
4
Medium Priority
?
288 Views
Last Modified: 2010-04-30
I have two macros (both public) in the this workbook section of vb.  When I open the spreadsheet, one is available to execute but the other is not.  Why?
0
Comment
Question by:ilrosebud26
[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
  • 2
4 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 21857025
What happens when you try to execute it?
0
 

Author Comment

by:ilrosebud26
ID: 21857066
When I first open the workbook and try to launch from the menu, the run option is not available.  If I save the file after it is open, the macro name changes and the run button is then available.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 21857125
If you mean that they aren't visible from the Tools/Macro menu, the list will not show subs that need a parameter or any functions.
0
 

Author Comment

by:ilrosebud26
ID: 21857570
Here is the macro....I do not think there is anything that needs a parameter or function.  

Rosemary
Public Sub DeleteMenu()
    On Error Resume Next
    Application.CommandBars("Worksheet Menu Bar").Controls("Marketing Cost").Delete
    On Error GoTo 0
End Sub

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Suggested Courses

636 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