Using the Kies of Kyboard in VBA(excel)
if I click on command button it will execute the code to select sheets(2).I want to execute the code bu using the kye of keyboard example : Alt+Q
by the way I'm using the button on the sheets not on the Form
vb Code:
Private Sub CommandButton3_Click()
Sheets(2).Select
End Sub
Re: Using the Kies of Kyboard in VBA(excel)
Since you didn't specify what version you are using you'll have to look it up for your version.
This is for 2003:
http://office.microsoft.com/en-us/ex...005202306.aspx
Re: Using the Kies of Kyboard in VBA(excel)
It's a good idea to use the actual sheet name rather than the index number... If you move sheets around this will cause problems for you.
Replace "Sheet2" with the name that you have chosen for the sheet
Code:
Private Sub CommandButton3_Click()
Sheets("Sheet2").Select
End Sub
Re: Using the Kies of Kyboard in VBA(excel)
Re: Using the Kies of Kyboard in VBA(excel)