Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
With the code below, I am trying to highlight a default value of 000000 in a textbox (textbox1) in my userform. This will allow the user to overwrite the default entry without having to first select it.
The default value of "000000" isn't showing in the textbox let along that value being highlighted.
Is anyone able to tell me where the problem exists?
Code:
With TextBox1 'rental number
'cb_mri.Visible = False
.Locked = False
.BackColor = RGB(255, 255, 255)
.Value = format(0, "000000") 'new rental
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
The default value of "000000" isn't showing in the textbox let along that value being highlighted.
Is anyone able to tell me where the problem exists?