I'm still having trouble with the following. I did get one response that
said that in order for the Macro to show it "it must be a Public Sub with no
parms." I'm not sure what that means. Can someone help?
It seems that my FormField Option box is pointing to the wrong place. The
>exit drop down box gives me Project.NewMacros or Normal.NewMacros as my two
>choices rather than the macro that I've named and attached to my file.
>
>See below string also:
>I opened up my document which is called New Director. I then opened VBA
>editor. I found "Project (New Director)" and opened it. It had three
>additional plus signes under it. One is called Microsoft Word Objects, one
>is Modules and one is References. Under Microsoft Word Objects it has the
>word icon with "ThisDocument" Under Modules it has New Macros. When I
>double click on it, it comes up with the name of the macro that I created for
>this document. This is the only macro that I created for this document.
>However when I then go to the space where the macro is to run on my document
>and click the FormField Option box, it shows three macros available but none
>of them are named the name I gave my macro.
>
>Lynda
>
>"Jay Freedman" wrote:
>
>> caring4211 wrote:
>> > I am having one problem in the Form Field Options Box. I have check
>> > boxes which I've renamed. I went in and created a Macro and made
>> > sure my document was showing in the Macro in box. However when I go
>> > to the Form Field Options Box and want to list the Macro in the exit
>> > box the name of my macro isn't there. I've tried a new document and
>> > it's doing the same thing. Suggestions?
>>
>> If the macro really is in the same document with the check box, it should
>> show up in the list. Here's how to check:
>>
>> Open the VBA editor (Alt+F11). If you don't see the Project Explorer pane on
>> the left, press Ctrl+R or select it from the View menu.
>>
>> There will be an icon labeled "Project (MyDocument)" or whatever the
>> document's actual name is. If that's collapsed, click the little plus sign
>> to expand it. Under that you'll see a folder icon labeled "Modules"; expand
>> that.
>>
>> Now you should see at least one module icon, labeled "NewMacros" or
>> "Module1" or something like that. Double-click it. You should see your
>> macro's code in the big window to the right.
>>
>> If any of the things I've described aren't there, then your macro isn't in
>> the document. It might be in a module under the Normal project -- but then
>> it still should be listed in the Exit Macro dropdown. You might find it in
>> some other template or document, although that's unlikely -- or it simply
>> might not have been saved at all.
Did this post answer the question?
Word Heretic - 29 Jun 2005 14:47 GMT
G'day "caring4211" <caring4211@discussions.microsoft.com>,
Public Sub MyRoutine()
End Sub
now, if you do
Public Sub MyRoutine(SomeParameter as Whatever)
End Sub
it wont show up, nor will
Private Sub MyRoutine()
End Sub
or
Public Function MyRoutine()
End Function
It also wont show up if it is a class module, so if you are using
objects you need to access them from a 'wrapper' routine, a simplified
eg, in a std code module:
Public Sub UseMyObjectToDoACertainThing()
MyObject.Do ACertainThing
End Sub
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
caring4211 reckoned:
>I'm still having trouble with the following. I did get one response that
>said that in order for the Macro to show it "it must be a Public Sub with no
[quoted text clipped - 50 lines]
>
> Did this post answer the question?