ByRef Argument Type mismatch
I have some code that looks like:
Sub doToCells()
Dim formula As String
...
formula = InputBox(message, title, defString)
pr_doToCells formula
end sub
Private Sub pr_doToCells(formula As String)
If formula < "" Then
formula = Replace(formula, ..., ...)
...
End If
End Sub
But I get an error - ByRef Argument type mismatch when it compiles -
complaining about the "formula" used as an argument to pr_doToCells.
Cannot understand why, and the problem disappears if I put parentheses
around the "formula" argument when I call it.
Any ideas?
Thanks
Tone
|