Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been wrestling with this one for days, and I just can't
seem to pull it off. What I'd like to do when a certain TextBox on a UserForm takes the focus is to have the insertion point automatically move one space to the left. So, for example, if the TextBox contains ""ABC" upon taking the focus what I want to see is "AB|C"; I've been trying to do this by using Application.SendKeys "{LEFT}" in some manner but to no avail. I can obviously do it manually by pressing the left arrow key, but I want to do it in VBA so as to remind the user of how the data entry appearing in that particular TextBox is to be modified. Anyone have any ideas on how to do this? -- Dennis Eisen |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check out the "selstart" property of the textbox.
Setting selstart to len(textbox text)-1 and sellength to 0 should do it. Tim "DennisE" wrote in message ... I've been wrestling with this one for days, and I just can't seem to pull it off. What I'd like to do when a certain TextBox on a UserForm takes the focus is to have the insertion point automatically move one space to the left. So, for example, if the TextBox contains ""ABC" upon taking the focus what I want to see is "AB|C"; I've been trying to do this by using Application.SendKeys "{LEFT}" in some manner but to no avail. I can obviously do it manually by pressing the left arrow key, but I want to do it in VBA so as to remind the user of how the data entry appearing in that particular TextBox is to be modified. Anyone have any ideas on how to do this? -- Dennis Eisen |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim,
Thanks. That indeed did the trick. -- Dennis Eisen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change Insertion Point | Excel Discussion (Misc queries) | |||
Position insertion point at beginning of cell when editing | Excel Discussion (Misc queries) | |||
Why did my Excel insertion point change to a cross? | New Users to Excel | |||
how to change the insertion point color? | Excel Worksheet Functions | |||
causing macros to run at insertion point | Excel Worksheet Functions |