Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 22023

[RESOLVED] MaskedBox

$
0
0
I have a maskedBox with a "(###) ###-####" mask (for telnums obviously).
I have the clipMode property set to 1-mskExcludeLiterals.
When I type in a telephone number (eg, 8005551234) it appears as (800) 555-1234 (as it should).
Then, if I use the mouse and Ctrl-C (or right mouse, copy) to copy the contents of the maskedbox,
and then paste that value into a textbox, (will eventually put it into a db) it appears as I want: 8005551234.

What I really want however, is to use a cmdbutton to copy/paste the NUMBERS (without literals) into that textbox.

Here is my (non-working) click event:

Private Sub Command2_Click()
Clipboard.SetText (MaskEdBox1.Text)
Text1.Text = Clipboard.GetText
End Sub

This code puts (800) 555-1234 into text1, instead of what happens when I manually use the clipboard (8005551234).
Any idea why?

Viewing all articles
Browse latest Browse all 22023

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>