' Modify a phone-number to the format "XXX-XXXX" or "(XXX) XXX-XXXX".Function FormatPhoneNumber(ByVal text As String) As String Dim i As Long ' ignore empty strings If Len(text) = 0 Then Exit Function ' get rid of dashes and invalid chars For i = Len(text) To 1 Step -1 If InStr("0123456789", Mid$(text, i, 1)) = 0 Then text = Left$(text, i - 1) & Mid$(text, i + 1) End If Next ' then, re-insert them in the correct position If Len(text) <= 7 Then FormatPhoneNumber = Format$(text, "!@@@-@@@@") Else FormatPhoneNumber = Format$(text, "!(@@@) @@@-@@@@") End IfEnd Function


The Best Mechanical Keyboards For Programmers: Where To Find Them
When it comes to programming, a good mechanical keyboard can make all the difference. Naturally, you would want one of the best mechanical keyboards for programmers. But with so many