Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing keystrokes
I need to replace keystrokes the user types in cells of a spreadsheet. For
example, if they type a period "." I want to replace it with a colon ":". I've tried combinations of OnKey with SendKeys but I cannot get it to work. Does anyone have any suggestions on how to do this? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing keystrokes
Macros don't run when a user edits a cell. You could use the change event
to review what was entered and change it. http://www.cpeason.com/excel/events.htm -- Regards, Tom Ogilvy "Terry Lowe" wrote in message ... I need to replace keystrokes the user types in cells of a spreadsheet. For example, if they type a period "." I want to replace it with a colon ":". I've tried combinations of OnKey with SendKeys but I cannot get it to work. Does anyone have any suggestions on how to do this? Thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Replacing keystrokes
You could make a temporary entry into the AutoCorrect list:
Private Sub Workbook_Activate() Application.AutoCorrect.AddReplacement ".", ":" End Sub Private Sub Workbook_Deactivate() Application.AutoCorrect.DeleteReplacement "." End Sub In article , "Terry Lowe" wrote: I need to replace keystrokes the user types in cells of a spreadsheet. For example, if they type a period "." I want to replace it with a colon ":". I've tried combinations of OnKey with SendKeys but I cannot get it to work. Does anyone have any suggestions on how to do this? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Switch between sheets with keystrokes? | Excel Worksheet Functions | |||
Recording a Macro that follows Keystrokes | Excel Discussion (Misc queries) | |||
Lotus 123 keystrokes in Excel | Excel Discussion (Misc queries) | |||
Select in Listbox using keystrokes | Excel Programming | |||
Toggle Macro with KeyStrokes | Excel Programming |