P
Phil H
Could someone modify this Excel macro to count all characters and spaces in
the current word document. Appreciate any help.
Sub CountCellCharacters()
Dim StrinLen As Long
Dim EmptySpaces As Long
Dim Cellref As String
Cellref = Trim(ActiveCell.Value)
StrinLen = Len(Cellref)
EmptySpaces = StrinLen - Len(Replace(Cellref, " ", ""))
MsgBox "Total Cell Characters and Spaces: " & StrinLen & Chr(10) ' & "Empty
Spaces: " & EmptySpaces
End Sub
the current word document. Appreciate any help.
Sub CountCellCharacters()
Dim StrinLen As Long
Dim EmptySpaces As Long
Dim Cellref As String
Cellref = Trim(ActiveCell.Value)
StrinLen = Len(Cellref)
EmptySpaces = StrinLen - Len(Replace(Cellref, " ", ""))
MsgBox "Total Cell Characters and Spaces: " & StrinLen & Chr(10) ' & "Empty
Spaces: " & EmptySpaces
End Sub