Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dajana
 
Posts: n/a
Default Esc Key Macro instead of Ctrl+...

I have written a macro that automatically hides the sheet when Ctrl+a is
pressed. However I would like to know if it is possible to write a program
that would allow me to use Esc instead of Ctrl+a.

Thanks
Dajana
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Esc Key Macro instead of Ctrl+...

You can use application.onkey to reassign that key. But remember, it won't do
anything while you're editting a cell.

Option Explicit
Sub testme01A()
Application.OnKey "{Escape}", "Testme01B"
End Sub
Sub testme01B()
MsgBox "you hit escape"
End Sub
Sub testme01C()
Application.OnKey "{Escape}"
End Sub


The top procedure turns it on and the bottom turns it back to normal.

Dajana wrote:

I have written a macro that automatically hides the sheet when Ctrl+a is
pressed. However I would like to know if it is possible to write a program
that would allow me to use Esc instead of Ctrl+a.

Thanks
Dajana


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Esc Key Macro instead of Ctrl+...

Ps. I don't think I'd do this. Escape is used for other things that are too
useful.

Dajana wrote:

I have written a macro that automatically hides the sheet when Ctrl+a is
pressed. However I would like to know if it is possible to write a program
that would allow me to use Esc instead of Ctrl+a.

Thanks
Dajana


--

Dave Peterson
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
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Can T Get Macro To Run! Nipper New Users to Excel 2 November 4th 05 04:48 AM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM


All times are GMT +1. The time now is 08:51 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"