View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default TextBox.Activate - QUICKY OFF THE TOP OF SOMEONES HEAD

Jason,

Use the SelStart and SelLength properties. E.g,

With Me.TextBox1
.SelStart =0
.SelLength = Len(.Text)
.SetFocus
End With

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"jason" wrote in message
om...
When I use TxtName.Activate (where TxtName is a textbox with

some
narrative already in it) I'd like all the text to be selected,

rather
than the cursor just ending up at the end of the narrative.

Any help greatly appreciated

Jason