Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default assigning a macro to the tab key

I would like to assign a macro to run whenever the tab key is pressed could
anyone help?
thanks
--
bill k
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default assigning a macro to the tab key

You can do it but you need to be carefull with this type of code. It is
application level code so it is in effect for all of Excel, not just the
current workbook. You may want to handle this code using the following events
to get the code initialized and deactivated as necessary.

Workbook Open, Close, Activate and Deactivate

Sub DoTab()
Application.OnKey "{TAB}", "MyMacro"
End Sub

Sub UndoTab()
Application.OnKey "{TAB}"
End Sub
--
HTH...

Jim Thomlinson


"Bill K" wrote:

I would like to assign a macro to run whenever the tab key is pressed could
anyone help?
thanks
--
bill k

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
assigning value in macro tina Excel Programming 4 October 29th 09 03:33 PM
assigning macro carrera Excel Discussion (Misc queries) 16 March 21st 08 09:00 PM
Assigning a macro to a button Nigel Drinkwater Excel Programming 3 April 3rd 06 01:00 PM
Macro assigning help PLEASE Jim Rech Excel Programming 0 February 10th 04 10:03 PM
Assigning Macro To Shape Tommi[_2_] Excel Programming 2 October 31st 03 10:58 AM


All times are GMT +1. The time now is 11:59 PM.

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

About Us

"It's about Microsoft Excel"