Solved

Macro not available to execute from this workbook.

Posted on 2008-06-24
4
281 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
  • 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 125 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

786 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