#1   Report Post  
Posted to microsoft.public.word.docmanagement
Jack B Jack B is offline
external usenet poster
 
Posts: 34
Default macro button

Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack



  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default macro button

Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack




  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Jack B Jack B is offline
external usenet poster
 
Posts: 34
Default macro button

Suzanne --

You're talking to a visual basic Rodney Dangerfield. I tackle something
like this only once in a blue moon, and was lucky to figure out how to
rewrite it without screwing up something else. Seems like a number of
macros are on the same "sheet."

Anyway,
1) I am not sure what to rename the macro. When I move the cursor over the
button, it says "BB macro." However, I know there can't be any spaces, and
I'm not sure that "BBmacro" was actually the name. What name do I need to
change it to?
2) To change the name, do I go back to VB and change the name -- that's it?

Jack


"Suzanne S. Barnhill" wrote in message
...
Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack





  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default macro button

I'm a VBA dunce myself, but I believe what you need to do is open the VBA
Editor (Alt+F11) and look for your macro. If you didn't specify any other
module to save it in, it will be saved in the NewMacros module of
Normal.dot, which is what opens by default when you open the editor.
Whatever appears after Sub is the name of the macro. Just change that name
to whatever is on the button, and with any luck the button will work.

Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Suzanne --

You're talking to a visual basic Rodney Dangerfield. I tackle something
like this only once in a blue moon, and was lucky to figure out how to
rewrite it without screwing up something else. Seems like a number of
macros are on the same "sheet."

Anyway,
1) I am not sure what to rename the macro. When I move the cursor over

the
button, it says "BB macro." However, I know there can't be any spaces,

and
I'm not sure that "BBmacro" was actually the name. What name do I need to
change it to?
2) To change the name, do I go back to VB and change the name -- that's

it?

Jack


"Suzanne S. Barnhill" wrote in message
...
Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup

so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for

it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so

I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack






  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jack B Jack B is offline
external usenet poster
 
Posts: 34
Default macro button

Suzanne,

If you didn't specify any other module to save it in, it will be saved in
the NewMacros module of Normal.dot


Ahh, I never was sure what that was all about - ok, so that's default.
Well, in trying to put a macro in its own module, I wiped out some other
macros in the past.

I guess what I need to do if want to put a macro in own module is
1) open the VBA Editor (Alt+F11) -- in my case, doing that gives me a blank
situation (no module to edit or create),
2) then go to the menu bar, click Insert and click on Module. But what I
get is a module that the title bar says is "Document1 - Module1 (Code)" and
in the top left drop down is "(General)" and in the top right drop down is
"(Declarations)" -- no quotes around any of that. If I create a macro, the
Declarations changes to the macro name I make. There seems to be no way to
save the macro, except via File/save Doc1.doc, which is the default blank
Word document. Then the macro is apparently associated only with that
document, because the macro shows up in Tools/Macros only when Doc1.doc is
the active document.

If you can explain how to make it part of Normal.dot, that would be
enlightening.

Anyway, for my button situation I did:
Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

Thanks,

Jack



"Suzanne S. Barnhill" wrote in message
...
I'm a VBA dunce myself, but I believe what you need to do is open the VBA
Editor (Alt+F11) and look for your macro. If you didn't specify any other
module to save it in, it will be saved in the NewMacros module of
Normal.dot, which is what opens by default when you open the editor.
Whatever appears after Sub is the name of the macro. Just change that name
to whatever is on the button, and with any luck the button will work.

Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Suzanne --

You're talking to a visual basic Rodney Dangerfield. I tackle something
like this only once in a blue moon, and was lucky to figure out how to
rewrite it without screwing up something else. Seems like a number of
macros are on the same "sheet."

Anyway,
1) I am not sure what to rename the macro. When I move the cursor over

the
button, it says "BB macro." However, I know there can't be any spaces,

and
I'm not sure that "BBmacro" was actually the name. What name do I need to
change it to?
2) To change the name, do I go back to VB and change the name -- that's

it?

Jack


"Suzanne S. Barnhill" wrote in message
...
Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup

so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button for

it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor, so

I
created another similar macro using a different name -- call it JBmacro.
How do I make the old button call up JBmacro?

Jack









  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default macro button

If you start with Tools | Macro | Macros, type a name for your macro, and
then click Create, you'll be all set. To change the name of your macro,
though, go to Tools | Macro | Macros, select the existing macro, and choose
Edit. Then change the name of the Sub in the VBA Editor.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jack B" wrote in message
...
Suzanne,

If you didn't specify any other module to save it in, it will be saved in
the NewMacros module of Normal.dot


Ahh, I never was sure what that was all about - ok, so that's default.
Well, in trying to put a macro in its own module, I wiped out some other
macros in the past.

I guess what I need to do if want to put a macro in own module is
1) open the VBA Editor (Alt+F11) -- in my case, doing that gives me a

blank
situation (no module to edit or create),
2) then go to the menu bar, click Insert and click on Module. But what I
get is a module that the title bar says is "Document1 - Module1 (Code)"

and
in the top left drop down is "(General)" and in the top right drop down is
"(Declarations)" -- no quotes around any of that. If I create a macro,

the
Declarations changes to the macro name I make. There seems to be no way

to
save the macro, except via File/save Doc1.doc, which is the default blank
Word document. Then the macro is apparently associated only with that
document, because the macro shows up in Tools/Macros only when Doc1.doc is
the active document.

If you can explain how to make it part of Normal.dot, that would be
enlightening.

Anyway, for my button situation I did:
Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

Thanks,

Jack



"Suzanne S. Barnhill" wrote in message
...
I'm a VBA dunce myself, but I believe what you need to do is open the VBA
Editor (Alt+F11) and look for your macro. If you didn't specify any other
module to save it in, it will be saved in the NewMacros module of
Normal.dot, which is what opens by default when you open the editor.
Whatever appears after Sub is the name of the macro. Just change that name
to whatever is on the button, and with any luck the button will work.

Failing that, in Tools | Customize, select the current macro and create a
button for it. Then right-click on the existing button and Copy Button
Image. Right-click on the new button and Paste Button Image. Then drag the
old button off the toolbar.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup

so
all may benefit.

"Jack B" wrote in message
...
Suzanne --

You're talking to a visual basic Rodney Dangerfield. I tackle something
like this only once in a blue moon, and was lucky to figure out how to
rewrite it without screwing up something else. Seems like a number of
macros are on the same "sheet."

Anyway,
1) I am not sure what to rename the macro. When I move the cursor over

the
button, it says "BB macro." However, I know there can't be any spaces,

and
I'm not sure that "BBmacro" was actually the name. What name do I need

to
change it to?
2) To change the name, do I go back to VB and change the name -- that's

it?

Jack


"Suzanne S. Barnhill" wrote in message
...
Why not just rename the macro?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the

newsgroup
so
all may benefit.

"Jack B" wrote in message
...
Re Word 97 ----

Years ago I created a macro -- call it BBmacro -- and made a button

for
it
(put into the Formatting toolbar).

I have accidentally deleted the macro using the Visual Basic editor,

so
I
created another similar macro using a different name -- call it

JBmacro.
How do I make the old button call up JBmacro?

Jack








Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I assign a macro to a command button Kooljay2 Microsoft Word Help 2 July 18th 06 03:01 PM
Macro execution using MailMerge nelsonj Mailmerge 9 June 13th 06 05:04 PM
How do you assign macro to toolbar button in microsoft word 2003 Trebormac Microsoft Word Help 2 October 26th 05 03:18 PM
How can i create a macro button that opens a template? rob Microsoft Word Help 1 July 12th 05 12:24 AM
How do I get all my Word documents within one Word window RobJacobs Microsoft Word Help 5 April 12th 05 03:04 AM


All times are GMT +1. The time now is 04:32 AM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"