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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use F6??

Status
Not open for further replies.

Fekri

Programmer
Jan 3, 2004
284
IR
Hi,

How can I use F6 instead of clicking on the command buttom??

Thanks
Ali

Thanks & Good Luck
Ali Fekri
 
Thanks,

I think it's the one which I need.

But unfortunately It was not clear for me how to create these macros.

I made as per instruction 2 macros and made the first line,

but in this instruction has 3 line on the bottom of each macro which I don't know how should I write on my macros.

best regards
Ali

Thanks & Good Luck
Ali Fekri
 
The lines at the bottom are the instructions that belong to that line. When you are using the macro screen, it looks like this:

[tt]
Macro Name Action Comment
Test1_______|MsgBox__|_________________________

____________|________|_________________________

<...>

Message The AutoKeys macro worked successfully!
Beep Yes
Type None
Title[/tt]

Here is another reference:

 
Or you can use a bit of code:
Code:
Private Sub Form_Load()
 Me.KeyPreview = True
End Sub

Private Sub form_keydown(KeyCode As Integer, Shift As Integer)

 Select Case KeyCode
        
  Case vbKeyF6 'Spell Check will not be invoked
    KeyCode = 0
    MsgBox "Pop goes thw weasle!"

 End Select

End Sub

Just replace line with the code behind your buttton, or simply call the OnClick event of the button.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top