User Forms, Command Buttons, Accelerator Keys 
Author Message
 User Forms, Command Buttons, Accelerator Keys

I am trying to create a UserForm with multiple click buttons with
accelerator keys. I created the first button, putting the accelerator
key in the Properties for the button. This seemed to work. However, when
I added two more buttons, it now only works if I click the buttons. I
want to be able to use the accelerator keys. Does someone have some
macro code events for a multiple button userform they could send me?
Here's what I have at the moment (and I have Unload now, but before I
was using the .Hide property, but thought that maybe the keypresses
weren't working because I was only hiding the dialog rather than
unloading).

Thx.

-Rich Belthoff

Private Sub TrackAllOn_Click()
With activedocument
.TrackRevisions = True
.PrintRevisions = True
.ShowRevisions = True
End With
Unload CtrlOO_Dlg
End Sub

Private Sub TrackAllOn_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)

With activedocument
.TrackRevisions = True
.PrintRevisions = True
.ShowRevisions = True
End With
Unload CtrlOO_Dlg
End Sub

Private Sub TrackDisplayOff_Click()
With activedocument
.TrackRevisions = True
.PrintRevisions = False
.ShowRevisions = False
End With
Unload CtrlOO_Dlg
End Sub

Private Sub TrackDisplayOff_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
With activedocument
.TrackRevisions = True
.PrintRevisions = False
.ShowRevisions = False
End With
Unload CtrlOO_Dlg
End Sub

Private Sub TrackOptionsAllOff_Click()
With activedocument
.TrackRevisions = False
.PrintRevisions = False
.ShowRevisions = False
End With
Unload CtrlOO_Dlg
End Sub

Private Sub TrackOptionsAllOff_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
With activedocument
.TrackRevisions = False
.PrintRevisions = False
.ShowRevisions = False
End With
Unload CtrlOO_Dlg
End Sub



Tue, 28 Jan 2003 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Accelerator keys won't display on form load

2. Word 2000, CommandBars and Accelerator Keys.

3. Accelerator Key Display in Custom Menu

4. Accelerator key problem

5. How is Command Button used with Alt key?

6. Accelerator key takes 2 tries to open combobox

7. UserForm, CommandButton, Accelerator Key

8. Accelerator keys in VB.NET

9. invoking a command button with a Function Key

10. Use a key to control a command button?

11. Function key to command buttons

12. assigning access key to graphic command button

 

 
Powered by phpBB® Forum Software