Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dennis later said in a separate thread:
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 so even he doesn't appear to be still enamored with his suggeste solution. -- Regards, Tom Ogilvy "John Tjia" wrote in message m... Thanks to all! The .SelStart = 0, .SelLength = Len(.Text) code is great. Dennis, I tried your code, but VBA didn't accept the .SendKeys{LEFT}. I saw something once that was the equivalent of a Tab command in the userform, i.e., set the focus on the next item in the tab order, and then do a Shift+Tab equivalent to back up. Thanks for the reply. (DennisE) wrote in message ... John, I'm not sure about the highlighting aspect of your question, but here's what you can do to shift the insertion point to the left of the zero: With UserForm1.TextBox1 .Text = "0" .SetFocus .SendKeys{LEFT} End With -- Dennis Eisen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
user form | Excel Discussion (Misc queries) | |||
user form | Excel Discussion (Misc queries) | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User form | New Users to Excel | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |