TextBox.Activate - QUICKY OFF THE TOP OF SOMEONES HEAD

  • Thread starter Thread starter jason
  • Start date Start date
J

jason

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
 
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
 
Hi Jason,

TextBox1.SelStart = 0
TextBox1.SelLength = Len(TextBox1.Text)

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top