Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Activate Spin Buttons with Keys

Pretty Simple I think, I'm just learning VBA. I want to be able to
control two different spin buttons with 4 different keys. (ex. i key is
up, k key is down on one spin button, j key is left and L key is right
on the other spin button. I already have some code written for these
buttons, I would just like to hit a key rather than clicking the
buttons. Also, I want to be able to hold down the key just like
clicking and holding.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Activate Spin Buttons with Keys

Hi Donny,

'try this :
Sub getStarted()
Application.OnKey "j", "SpinDown"
End Sub

'your code goes here
Sub SpinDown()
ActiveCell.Offset(1, 0).Activate
End Sub

'to end "j" onkey
Sub getTidy()
Application.OnKey "j"
End Sub

Rgds,

Halim


Donny menuliskan:
Pretty Simple I think, I'm just learning VBA. I want to be able to
control two different spin buttons with 4 different keys. (ex. i key is
up, k key is down on one spin button, j key is left and L key is right
on the other spin button. I already have some code written for these
buttons, I would just like to hit a key rather than clicking the
buttons. Also, I want to be able to hold down the key just like
clicking and holding.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activate Chart Buttons TJ Charts and Charting in Excel 1 August 20th 09 03:06 AM
'spin buttons' & vbasic language Browny Excel Discussion (Misc queries) 0 May 9th 08 04:27 AM
Spin Buttons are too Slow For Use [email protected] Excel Discussion (Misc queries) 2 June 19th 07 05:16 PM
dynamically changing chart y axis using spin buttons and worksheet_calculate event jimnwilson Excel Programming 2 July 10th 04 04:24 AM
How can I use the Spin or Toggle buttons to change cell values PKyle Excel Programming 1 April 7th 04 10:39 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"