Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
store default printer, change printer and then restore default printer? | Excel Programming | |||
How to change the default of 30 days change history | Excel Discussion (Misc queries) | |||
How to change the default directory | Excel Programming | |||
How to change default row height | Excel Discussion (Misc queries) | |||
Change Default Add-in Folder | Excel Discussion (Misc queries) |