ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to get a macro to record F2, Home, Delete keystrokes (https://www.excelbanter.com/excel-programming/335214-how-get-macro-record-f2-home-delete-keystrokes.html)

jenonstx

how to get a macro to record F2, Home, Delete keystrokes
 
trying to edit the contents of a cell, but the macro acts as if I am typing
in whatever remains in the cell instead.

Bernie Deitrick

how to get a macro to record F2, Home, Delete keystrokes
 
Excel lacks the type of keystroke macro recording ability that would allow
this. In VBA, you need to use something like this, which will remove the
first character of a string in a cell:

ActiveCell.Value = Mid(ActiveCell.Value, 2, Len(ActiveCell.Value))

HTH,
Bernie
MS Excel MVP



"jenonstx" wrote in message
...
trying to edit the contents of a cell, but the macro acts as if I am
typing
in whatever remains in the cell instead.





All times are GMT +1. The time now is 10:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com