D
daniel chen
Some time ago, from a post by JE McGimpsey,
I learned the following macro, which will toggle the substitution of "."
with ":"
However it left the cell in Time Format after its initial entry.
How do I clear the Time Format, when decimal point is back to normal state.
Please,
Public Sub ToggleDotTime()
Dim strmsg As String
strmsg = "Decimal Point is NORMAL"
With Application.AutoCorrect
On Error Resume Next
.DeleteReplacement (".")
If Err Then
.AddReplacement ".", ":"
Application.ClearFormats = True
strmsg = Application.Substitute(strmsg, _
"is NORMAL", "is substituted by "":""")
Application.ClearFormats = True
End If
On Error GoTo 0
Application.StatusBar = strmsg
End With
End Sub
I learned the following macro, which will toggle the substitution of "."
with ":"
However it left the cell in Time Format after its initial entry.
How do I clear the Time Format, when decimal point is back to normal state.
Please,
Public Sub ToggleDotTime()
Dim strmsg As String
strmsg = "Decimal Point is NORMAL"
With Application.AutoCorrect
On Error Resume Next
.DeleteReplacement (".")
If Err Then
.AddReplacement ".", ":"
Application.ClearFormats = True
strmsg = Application.Substitute(strmsg, _
"is NORMAL", "is substituted by "":""")
Application.ClearFormats = True
End If
On Error GoTo 0
Application.StatusBar = strmsg
End With
End Sub