1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub TextBox2_Change()
With TextBox2:
If .Value = "" Then
.Text = "Dose SVP ?": .SelStart = 0: .SelLength = Len(TextBox2)
.SetFocus: .ForeColor = vbRed: Beep
ElseIf .Value = "Dose SVP ?" Then
.ForeColor = vbRed: Beep: .SelStart = 0: .SelLength = Len(TextBox2)
Else
.ForeColor = vbBlack
End If
End With
End Sub
Private Sub TextBox2_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
With TextBox2
If .Value = "Dose SVP ?" Then .SelStart = 0: .SelLength = Len(TextBox2)
End With
End Sub |