|
-
Nov 19th, 2002, 05:31 AM
#1
Thread Starter
Frenzied Member
How to clear a MaskedBox?
I have a MaskedBox masked as ##/##/##, but I want to clear it after I use it. I've tried:
mBox.Text = ""
mBox = " / / "
mBox = "--/--/--"
mBox.Clear
But all result in errors
-
Nov 19th, 2002, 05:35 AM
#2
Member
try this in order
VB Code:
mBox.Mask = ""
mBox.Text = ""
mBox.Mask = "--/--/--"
-
Nov 19th, 2002, 05:54 AM
#3
Addicted Member
Re: How to clear a MaskedBox?
this is the code I use for both mask and text boxs
For X = 0 To Me.Controls.Count - 1
If (TypeOf Me.Controls(X) Is TextBox) Then Me.Controls(X).Text = "" Else Me.Controls(X).Text = "###-###-###"
Me.Controls(X).Enabled = False
End If
Next X
Originally posted by mel_flynn
I have a MaskedBox masked as ##/##/##, but I want to clear it after I use it. I've tried:
mBox.Text = ""
mBox = " / / "
mBox = "--/--/--"
mBox.Clear
But all result in errors
-
Nov 19th, 2002, 06:19 AM
#4
Thread Starter
Frenzied Member
Nice one, thanks.
Code:
mBox.Mask = ""
mBox.Text = ""
mBox.Mask = "##/##/##"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|