Option Explicit
Private Sub TextBox1_Enter()
tbSelected TextBox1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
tbUnSelected TextBox1
End Sub
Private Sub tbSelected(tb As MSForms.TextBox)
With tb
.Text = ""
.ForeColor = vbBlack
End With
End Sub
Private Sub tbUnSelected(tb As MSForms.TextBox)
With tb
.Text = "请以”2011-1-1“格式进行输入"
.ForeColor = RGB(192, 192, 192)
End With
End Sub
Private Sub UserForm_Activate()
tbUnSelected TextBox1
End Sub