View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Anders S Anders S is offline
external usenet poster
 
Posts: 35
Default Windows versions diff

What happens (does not happen) on your Win 2000 system?

This works for me with Windows 2000, Excel XP:

'****
Private Sub UserForm_Initialize()
TextBox1.Text = "Blaha blaha"
With TextBox1
..SelStart = 0
..SelLength = Len(.Text)
..SetFocus
End With
End Sub
'****

Regards
Anders Silvén


"Garry Jones" skrev i meddelandet
...
On UserForm_Initialize() I read in a value to a text box.

This following code then highlights the text in that text box.

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

But this only works on Windows 98, but not on Windows 2000.

Is there any other code that is universal and will give me the same
effect in both operating systems?

Garry Jones