Can't repeat nor redo VBA action

S

Sheila

The following applies to Word 2000, XP and 2003:

I have written some VBA macros. When the users are using them, both the
"Repeat" command in the "Edit" menu and the "Redo" button in the standard
toolbar are greyed out. The "Undo" commands are okay though.

One of the macros simply applies a style to the selected text:
ActiveWindow.Selection.Style = ActiveDocument.Styles(sStyle)
(sStyle being the tag of the action control clicked by the user)

The users would like to repeat that command by using [ctrl]+[y] or by using
[F4] instead of having to navigate to the action control with the mouse.

How can I make the repeat/redo commands accessible for VBA macros, in
particular the above command?

Thanks in advance for any help!

Sheila
 
D

Doug Robbins - Word MVP

Assign the macro to the keyboard or a button on the toolbar.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
S

Sheila

I have created a toolbar and assigned the macros to the toolbar action
controls. That doesn't help.

Do you have any other suggestions?

Thanks, Sheila

Doug Robbins - Word MVP said:
Assign the macro to the keyboard or a button on the toolbar.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Sheila said:
The following applies to Word 2000, XP and 2003:

I have written some VBA macros. When the users are using them, both the
"Repeat" command in the "Edit" menu and the "Redo" button in the standard
toolbar are greyed out. The "Undo" commands are okay though.

One of the macros simply applies a style to the selected text:
ActiveWindow.Selection.Style = ActiveDocument.Styles(sStyle)
(sStyle being the tag of the action control clicked by the user)

The users would like to repeat that command by using [ctrl]+[y] or by
using
[F4] instead of having to navigate to the action control with the mouse.

How can I make the repeat/redo commands accessible for VBA macros, in
particular the above command?

Thanks in advance for any help!

Sheila
 
D

Doug Robbins - Word MVP

What happens when you press the button on the toolbar to which you have
assigned the macro? Doesn't the macro run?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Sheila said:
I have created a toolbar and assigned the macros to the toolbar action
controls. That doesn't help.

Do you have any other suggestions?

Thanks, Sheila

Doug Robbins - Word MVP said:
Assign the macro to the keyboard or a button on the toolbar.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Sheila said:
The following applies to Word 2000, XP and 2003:

I have written some VBA macros. When the users are using them, both the
"Repeat" command in the "Edit" menu and the "Redo" button in the
standard
toolbar are greyed out. The "Undo" commands are okay though.

One of the macros simply applies a style to the selected text:
ActiveWindow.Selection.Style = ActiveDocument.Styles(sStyle)
(sStyle being the tag of the action control clicked by the user)

The users would like to repeat that command by using [ctrl]+[y] or by
using
[F4] instead of having to navigate to the action control with the
mouse.

How can I make the repeat/redo commands accessible for VBA macros, in
particular the above command?

Thanks in advance for any help!

Sheila
 
S

Sheila

Yes, it does run. There are about 40 macros accesssible to the users, and all
run just fine.

By the way: The "Undo" command is available after the users have executed a
macro, and when "Undo" has been executed once, "Redo" works too.

Kind regards, Sheila

Doug Robbins - Word MVP said:
What happens when you press the button on the toolbar to which you have
assigned the macro? Doesn't the macro run?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Sheila said:
I have created a toolbar and assigned the macros to the toolbar action
controls. That doesn't help.

Do you have any other suggestions?

Thanks, Sheila

Doug Robbins - Word MVP said:
Assign the macro to the keyboard or a button on the toolbar.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

The following applies to Word 2000, XP and 2003:

I have written some VBA macros. When the users are using them, both the
"Repeat" command in the "Edit" menu and the "Redo" button in the
standard
toolbar are greyed out. The "Undo" commands are okay though.

One of the macros simply applies a style to the selected text:
ActiveWindow.Selection.Style = ActiveDocument.Styles(sStyle)
(sStyle being the tag of the action control clicked by the user)

The users would like to repeat that command by using [ctrl]+[y] or by
using
[F4] instead of having to navigate to the action control with the
mouse.

How can I make the repeat/redo commands accessible for VBA macros, in
particular the above command?

Thanks in advance for any help!

Sheila
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top