Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Focus
Hi,
I use set focus on a user form to move the cursor to text boxes after certain events. What I want is instead of a cursor is to have the text box "highlighted" so that I don't have to delete the existing value before typing in a new value. I'm not sure what to call this format or if there is a method/property for it in VB . It's like when you drag the cursor over text and the background goes black ready for editing - this is the state I want my textbox to be in after an event. How do I do this? Regards gregork |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Focus
With TextBox1
.SelStart = 0 .SelLength = Len(.Text) End With -- Vasant "gregork" wrote in message ... Hi, I use set focus on a user form to move the cursor to text boxes after certain events. What I want is instead of a cursor is to have the text box "highlighted" so that I don't have to delete the existing value before typing in a new value. I'm not sure what to call this format or if there is a method/property for it in VB . It's like when you drag the cursor over text and the background goes black ready for editing - this is the state I want my textbox to be in after an event. How do I do this? Regards gregork |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Focus
Thanks Vasant that was exactly what I was looking for.
Regards gregork "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... With TextBox1 .SelStart = 0 .SelLength = Len(.Text) End With -- Vasant "gregork" wrote in message ... Hi, I use set focus on a user form to move the cursor to text boxes after certain events. What I want is instead of a cursor is to have the text box "highlighted" so that I don't have to delete the existing value before typing in a new value. I'm not sure what to call this format or if there is a method/property for it in VB . It's like when you drag the cursor over text and the background goes black ready for editing - this is the state I want my textbox to be in after an event. How do I do this? Regards gregork |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
focus | Excel Discussion (Misc queries) | |||
set focus | Excel Discussion (Misc queries) | |||
Focus | Excel Worksheet Functions | |||
How do I set focus | Excel Programming | |||
set focus | Excel Programming |