Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Reprogram/reassign some function keys in Excel 2007

Hi,



We would like to reprogram/reassign Excel 2007 F4 to do something similar to
this:



"From your current selected cell go 6 columns right and make that cell
selected"



I think the code for that is roughly: ActiveCell.Offset(rowoffset:=0,
columnoffset:=6).Select



and with the function key stuff it roughly is: Application.OnKey "{F4}",
"ActiveCell.Offset(rowoffset:=0, columnoffset:=6).Select"



but the OnKey stuff does not work as far as we can tell. They are using
Excel 2007.



1) Any ideas? We have a customer that really would like to
reprogram/reassign some function keys in Excel, will help them a lot.



2) If it does not work with our approached method, can you maybe give
another method for reprogram/reassign the Excel 2007 keys?



Per...



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Reprogram/reassign some function keys in Excel 2007

You actually have to reassign the key to a subroutine--not just the code that
you want run.

This would go into a general module:

Option Explicit
Sub auto_open()
Application.OnKey "{F4}", "SelectOver6Cols"
End Sub
Sub auto_Close()
Application.OnKey "{F4}"
End Sub
Sub SelectOver6Cols()
On Error Resume Next
ActiveCell.Offset(0, 6).Select
If Err.Number < 0 Then
Err.Clear
Beep 'to far to the right already!
End If
On Error GoTo 0
End Sub





Per Moeller-Olsen wrote:

Hi,

We would like to reprogram/reassign Excel 2007 F4 to do something similar to
this:

"From your current selected cell go 6 columns right and make that cell
selected"

I think the code for that is roughly: ActiveCell.Offset(rowoffset:=0,
columnoffset:=6).Select

and with the function key stuff it roughly is: Application.OnKey "{F4}",
"ActiveCell.Offset(rowoffset:=0, columnoffset:=6).Select"

but the OnKey stuff does not work as far as we can tell. They are using
Excel 2007.

1) Any ideas? We have a customer that really would like to
reprogram/reassign some function keys in Excel, will help them a lot.

2) If it does not work with our approached method, can you maybe give
another method for reprogram/reassign the Excel 2007 keys?

Per...


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Reprogram/reassign some function keys in Excel 2007

Thx. Will give it a shot when things ease a bit around here with all the
const custmr suprt we get involved in. Per...

"Dave Peterson" wrote in message
...
You actually have to reassign the key to a subroutine--not just the code
that
you want run.

This would go into a general module:

Option Explicit
Sub auto_open()
Application.OnKey "{F4}", "SelectOver6Cols"
End Sub
Sub auto_Close()
Application.OnKey "{F4}"
End Sub
Sub SelectOver6Cols()
On Error Resume Next
ActiveCell.Offset(0, 6).Select
If Err.Number < 0 Then
Err.Clear
Beep 'to far to the right already!
End If
On Error GoTo 0
End Sub





Per Moeller-Olsen wrote:

Hi,

We would like to reprogram/reassign Excel 2007 F4 to do something similar
to
this:

"From your current selected cell go 6 columns right and make that cell
selected"

I think the code for that is roughly: ActiveCell.Offset(rowoffset:=0,
columnoffset:=6).Select

and with the function key stuff it roughly is: Application.OnKey "{F4}",
"ActiveCell.Offset(rowoffset:=0, columnoffset:=6).Select"

but the OnKey stuff does not work as far as we can tell. They are using
Excel 2007.

1) Any ideas? We have a customer that really would like to
reprogram/reassign some function keys in Excel, will help them a lot.

2) If it does not work with our approached method, can you maybe give
another method for reprogram/reassign the Excel 2007 keys?

Per...


--

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
Excel 2007 Shortcut Keys (Y01 - Y18) willwonka Excel Discussion (Misc queries) 1 June 26th 09 04:28 PM
Excel 2007 shortcut keys [email protected] Excel Discussion (Misc queries) 0 May 1st 09 06:17 PM
Excel 2007 using arrow keys beckysmomma Excel Worksheet Functions 1 February 10th 09 08:02 PM
Reassign built-in shortcut keys in excel 2007 jan_arge Excel Discussion (Misc queries) 0 July 24th 08 12:31 PM
Shortcut keys in Excel 2007 luisaam Excel Worksheet Functions 0 June 25th 08 11:23 PM


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