I haver a user defined function to take the second to last word in a string and add 1 to it. When I run the macro with the function in it, I get "Sub Or Function Not Defined". When I go to the debugger, the "Rept" function is highlighted.
User Defined Function:
Public Function SECONDWORD(sw As String) As String
ln = Trim(Left(Right(" " & Substitute(Trim(sw), " ", Rept(" ", 60)), 120), 60))+1
End Function
Thanks in advance for any help I may get.
User Defined Function:
Public Function SECONDWORD(sw As String) As String
ln = Trim(Left(Right(" " & Substitute(Trim(sw), " ", Rept(" ", 60)), 120), 60))+1
End Function
Thanks in advance for any help I may get.