Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default OnKey for Alt f not overriding standard use of Alt-F

I want to use Alt F for something (toggle 'freeze panes').
I have this code in my personal.xls 'thisWorkbook' object module:

Private Sub Workbook_Open()
Set X.XL = Application
Application.OnKey "^+5", "applyFormatPercent"
'the macro procedure must be in a normal module. I use AppEvents
Application.OnKey "%f", "toggleFreezePanes"
End Sub


The first remapping, "applyFormatPercent" works fine (this gives me %
with one decimal point).

The second is not working. Alt-f always gives me the file menu.

The macro toggleFreezePanes works fine.

I also tried
Application.OnKey "%+f", "toggleFreezePanes" but I have the same
result.


Any ideas?

regards,

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default OnKey for Alt f not overriding standard use of Alt-F

Tim,

Apart from disabling the worksheet menu bar (CommandBars(1).Enabled=False), I don't know an easy way to override Alt+f. I suggest
you use Ctrl+Alt+f ("^%f")

--

John Green - Excel MVP
Sydney
Australia


"Tim Richardson" wrote in message om...
I want to use Alt F for something (toggle 'freeze panes').
I have this code in my personal.xls 'thisWorkbook' object module:

Private Sub Workbook_Open()
Set X.XL = Application
Application.OnKey "^+5", "applyFormatPercent"
'the macro procedure must be in a normal module. I use AppEvents
Application.OnKey "%f", "toggleFreezePanes"
End Sub


The first remapping, "applyFormatPercent" works fine (this gives me %
with one decimal point).

The second is not working. Alt-f always gives me the file menu.

The macro toggleFreezePanes works fine.

I also tried
Application.OnKey "%+f", "toggleFreezePanes" but I have the same
result.


Any ideas?

regards,

Tim



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
Overriding formula KANDLEZ[_2_] Excel Worksheet Functions 2 May 19th 09 09:45 PM
OnKey disabled by Excel at times? danhattan Excel Discussion (Misc queries) 4 August 29th 07 01:21 AM
onkey method freekrill Excel Discussion (Misc queries) 1 October 12th 05 01:31 PM
Onkey vs Macro Short cut key rgarber50 Excel Discussion (Misc queries) 1 July 10th 05 07:34 PM
capture users Application.OnKey RB Smissaert Excel Programming 1 September 8th 03 02:49 PM


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