De: Tim Zych Objet: Re: Highlighting text in a text box Date : mardi 19 octobre 1999 23:39 Charles: You could do something like the following: Create a Userform and TextBox. The following will reverse highlight TextBox1.Text on Tab or Enter, while TextBox has focus. 'In Userform code Private Sub TextBox1_Keydown(ByVal KeyCode As MSforms.ReturnInteger, ByVal Shift As Integer) if KeyCode = 13 Or KeyCode = 9 then 'Enter & Tab respectively HighlightText end if end Sub Private Sub HighlightText() TextBox1.setFocus 'text reverse TextBox1.SelStart = 0 TextBox1.SelLength = Len(TextBox1.Text) end Sub C DeLand wrote in message <380CF036.37E1B107@husky-oil.com>... >I have a user form that allows people to enter a number in a text box, >say TextBox1. I want the default text to be highlighted, ready to >accept changes. I have tried several things but none seem to do what I >want. I am using Excel 97 SR2. Any suggestions would be very helpful. >Thanks! > >Charles >