Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change default F12

Hello there,

is it possible to change the F12 button from "Save As" and when the user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change default F12

Correction to the last sentence: ...from F12 to something else.

"Dimitris" wrote:

Hello there,

is it possible to change the F12 button from "Save As" and when the user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Change default F12

You can assign F12 to some other macro that does nothing, see OnKey in help.
But unless you need F12 for other purposes what harm is it doing.

What's wrong with Ctrl-s as a built-in alternative to F12, or Alt-f, a.

Regards,
Peter T

"Dimitris" wrote in message
...
Hello there,

is it possible to change the F12 button from "Save As" and when the user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change default F12

With this line can I call Enter when I press F12 : Application.OnKey
"{F12}", "{ENTER}"

It is not working to me and I have the message:"I can not Find the macro
ENTER.

Thanks

Dimitris

"Peter T" wrote:

You can assign F12 to some other macro that does nothing, see OnKey in help.
But unless you need F12 for other purposes what harm is it doing.

What's wrong with Ctrl-s as a built-in alternative to F12, or Alt-f, a.

Regards,
Peter T

"Dimitris" wrote in message
...
Hello there,

is it possible to change the F12 button from "Save As" and when the user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Change default F12

Sub test()
OnKeyEdit 1 ' 0 to reset to default
End Sub

Sub OnKeyEdit(SetType As Long)
Dim sMacro As String
If SetType = 0 Then
' reset default
Application.OnKey "{F12}"
Else
If SetType = 1 Then
sMacro = "EditCell"
Else
' some other number to send an empty string
' and clear F12 of any action, even default
End If
Application.OnKey "{F12}", sMacro
End If

End Sub

Sub EditCell()
Application.SendKeys ("{F2}")
End Sub


Regards,
Peter T

"Dimitris" wrote in message
...
With this line can I call Enter when I press F12 : Application.OnKey
"{F12}", "{ENTER}"

It is not working to me and I have the message:"I can not Find the macro
ENTER.

Thanks

Dimitris

"Peter T" wrote:

You can assign F12 to some other macro that does nothing, see OnKey in
help.
But unless you need F12 for other purposes what harm is it doing.

What's wrong with Ctrl-s as a built-in alternative to F12, or Alt-f, a.

Regards,
Peter T

"Dimitris" wrote in message
...
Hello there,

is it possible to change the F12 button from "Save As" and when the
user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change default F12

Thanks a lot Peter

Dimitris

"Peter T" wrote:

Sub test()
OnKeyEdit 1 ' 0 to reset to default
End Sub

Sub OnKeyEdit(SetType As Long)
Dim sMacro As String
If SetType = 0 Then
' reset default
Application.OnKey "{F12}"
Else
If SetType = 1 Then
sMacro = "EditCell"
Else
' some other number to send an empty string
' and clear F12 of any action, even default
End If
Application.OnKey "{F12}", sMacro
End If

End Sub

Sub EditCell()
Application.SendKeys ("{F2}")
End Sub


Regards,
Peter T

"Dimitris" wrote in message
...
With this line can I call Enter when I press F12 : Application.OnKey
"{F12}", "{ENTER}"

It is not working to me and I have the message:"I can not Find the macro
ENTER.

Thanks

Dimitris

"Peter T" wrote:

You can assign F12 to some other macro that does nothing, see OnKey in
help.
But unless you need F12 for other purposes what harm is it doing.

What's wrong with Ctrl-s as a built-in alternative to F12, or Alt-f, a.

Regards,
Peter T

"Dimitris" wrote in message
...
Hello there,

is it possible to change the F12 button from "Save As" and when the
user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris






  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change default F12

Good afternoon from Greece

One more last question. If you are in a cell in edit mode and press F12
excel ignore the previous code and the F12 is again Save as.... How can i
Pass this problem? If you are not in the cell but you have just select it,
the code work perfect

Thanks...


"Dimitris" wrote:

Thanks a lot Peter

Dimitris

"Peter T" wrote:

Sub test()
OnKeyEdit 1 ' 0 to reset to default
End Sub

Sub OnKeyEdit(SetType As Long)
Dim sMacro As String
If SetType = 0 Then
' reset default
Application.OnKey "{F12}"
Else
If SetType = 1 Then
sMacro = "EditCell"
Else
' some other number to send an empty string
' and clear F12 of any action, even default
End If
Application.OnKey "{F12}", sMacro
End If

End Sub

Sub EditCell()
Application.SendKeys ("{F2}")
End Sub


Regards,
Peter T

"Dimitris" wrote in message
...
With this line can I call Enter when I press F12 : Application.OnKey
"{F12}", "{ENTER}"

It is not working to me and I have the message:"I can not Find the macro
ENTER.

Thanks

Dimitris

"Peter T" wrote:

You can assign F12 to some other macro that does nothing, see OnKey in
help.
But unless you need F12 for other purposes what harm is it doing.

What's wrong with Ctrl-s as a built-in alternative to F12, or Alt-f, a.

Regards,
Peter T

"Dimitris" wrote in message
...
Hello there,

is it possible to change the F12 button from "Save As" and when the
user
press it to be equal as he had press "Enter" Button?
Also I would like to know if I can change the built-in shortcut for the
"Save As" from F2 to something else.

thanks

Dimitris






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
store default printer, change printer and then restore default printer? Dennis Pedersen Excel Programming 0 November 14th 07 09:18 PM
How to change the default of 30 days change history Andy Smith[_2_] Excel Discussion (Misc queries) 6 October 23rd 07 11:57 PM
How to change the default directory Woody[_5_] Excel Programming 4 October 22nd 07 02:24 PM
How to change default row height rmt131 Excel Discussion (Misc queries) 0 August 18th 06 09:18 PM
Change Default Add-in Folder compound Excel Discussion (Misc queries) 2 July 13th 05 10:25 PM


All times are GMT +1. The time now is 10:37 AM.

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"