I would guess this is by design. After all, if you have
initialized the value to 12, there must be a good reason
for it. Put it another way, if you wanted to change the
value as soon as the form opened, then why would you
initialize the text box to 12? The best I could do is this:
Private Sub UserForm_Initialize()
Me.TextBox1.Value = 12
Me.TextBox1.SelStart = 0
End Sub
Geof.
-----Original Message-----
I have a form containing three textboxes with the right
adjust property
set. The first textbox is initialized with the number
12. The cursor is
blinking behind the number 12, which is not highlighted
like it should
be. When I type in the number 25 the textbox shows 1225
instead of
overwriting the number 12 to get 25. There is no problem
when I type in
the remaining textboxes where the existing number is
highlighted and is
overwritten by the number typed in.
I've tried making the tabindex 0 which didn't work. I
also put a dummy
textbox or commandbutton with an tabindex of 0 in front
of the leading
textbox. This worked but its dumb having to have to tab
it before
entering data in the desired textbox.
How can I fix this? What is happening? Is this a bug?
*** Sent via Developersdex http://www.developersdex.com
***
Don't just participate in USENET...get rewarded for it!
.