Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.
Private Sub Text0_DblClick(Cancel As Integer) ' text0 has input mask of !\(999") "000\-0000;;_" ' The user can copy "123 456.7890 extension 1-2345" ' from an email to clipboard ' then DoubleClick on textbox. All 15 digits will be ' pasted and will appear in the text box. The user can then cut the last digits ' and paste them into the extension text box. ' dataobject requires reference to Microsoft Forms 2.0 Object Library ' OPTIONALLY, dim y as regexp requires Microsoft VBScript Regular Expressions 5.5 Dim x As New dataobject ' Dim y As RegExp Dim y As Object Set y = CreateObject("vbscript.regexp") x.GetFromClipboard y.Pattern = "[^\d]*" y.Global = True digits = y.Replace(x.GetText, "") If Len(digits) = 7 Then digits = "000" & digits Text0.Value = digits End Sub