Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro not showing on list 1

Status
Not open for further replies.

mjstone323

Technical User
Jan 11, 2002
57
US
Please forgive this question if it displays almost complete cluelessness...
I'm *just* beginning to learn VBA. I wrote a macro based on a lesson, and, for some reason, unlike the other lesson macros I wrote, it's not showing up in Word's Tools-Macro-Macros list :( I've tried everything I can think of, and searched all over the internet for a solution... Can anyone help?
 

Most likely because you have one or more arguments (parameters) declared for the macro.

Second possibility is you declared it as Private.

These show:
Public Sub Something
End Sub

Sub SomethingElse
End Sub

These don't:
Private Sub SomethingAgain
End Sub

Sub SomethingWithParm( AParm As String )
End Sub
 
Thanks - I see that this macro has 'Private Sub' declared multiple times... I'm wondering now - do I need to change all the 'Privates' to 'Public'? Guess I'll monkey around with it a bit...
 
Okay - I figured it out...

The "Private" declarations have to stay that way for the form to work properly - I misunderstood the directions and put the following code in the *form*'s code, when it should have gone into "ThisDocument"'s code:


Private Sub Document_New()
frmFormName.Show
End Sub


D'OH!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top