Function withdots(sText As String) As String
For i = 1 To Len(sText)
withdots = withdots & Mid(sText, i, 1) & IIf(Mid(sText, i, 1) <> " ", ".", "")
Next
End Function
Sub f()
MsgBox withdots("mister excel")
End Sub
Private Sub TextBox1_Change()
Application.EnableEvents = False
If Right(TextBox1, 1) <> "." Then TextBox1 = TextBox1 & "."
Application.EnableEvents = True
End Sub
Private Sub TextBox1_Change()
If Right(TextBox1, 1) <> "." Then TextBox1 = TextBox1 & "."
End Sub
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode > 64 And KeyCode < 90 Then TextBox1 = UCase(TextBox1) & "."
End Sub