|
-
Apr 29th, 2011, 03:24 AM
#1
Thread Starter
Fanatic Member
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
-
Apr 30th, 2011, 11:30 PM
#2
Hyperactive Member
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
-
Apr 30th, 2011, 11:32 PM
#3
Hyperactive Member
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
-
May 2nd, 2011, 12:37 AM
#4
Thread Starter
Fanatic Member
Re: Using the Kies of Kyboard in VBA(excel)
-
May 2nd, 2011, 03:05 AM
#5
Hyperactive Member
Re: Using the Kies of Kyboard in VBA(excel)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|