Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Text in Text Box
Hello,
I have a user form that when it opens, I want the default text in it to be selected. I can't figure out how to do this. I've tried setting the relevant properties and used the Setfocus method, but I can't get it to work. Is this possible? Any help would be appreciated! Sam |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select Text in Text Box
Sam,
You need SelStart as well With TextBox1 .Text = "This is a test" .SelStart = 0 .SelLength = Len(.Text) .SetFocus End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Thomas" wrote in message ... Text1.SelLength = Len(Text1) Sam wrote: Hello, I have a user form that when it opens, I want the default text in it to be selected. I can't figure out how to do this. I've tried setting the relevant properties and used the Setfocus method, but I can't get it to work. Is this possible? Any help would be appreciated! Sam |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select text before carriage return | Excel Discussion (Misc queries) | |||
Random select of text | Excel Worksheet Functions | |||
Manual select a text box | Excel Discussion (Misc queries) | |||
Cannot select text boxes | Excel Discussion (Misc queries) | |||
Text desappears when I select wrap text | Excel Discussion (Misc queries) |