VBA error: "object doesn't support this property or method"
Hi,
You've writen ".InputsBox("Error. Re-enter anticipated per client fee")"
which is a typo.
InputsBox needs to be changed to InputBox.
I find it helpful to write code in lower case, then if excel understands
commands it changes them to mixed case. If they stay as lower case I know
I've made an error.
Hope that helps.
"Dave F" wrote:
What does this error mean?
Here's my code:
Sub EnterPerClientFee()
Dim MyString As String
MyString = Application.InputBox("Enter anticipated per-client fee")
Worksheets("Analysis").Range("b20") = MyString
If Worksheets("Analysis").Range("J17") = "TRUE" Then
Exit Sub
Else
MyString = Application.InputsBox("Error. Re-enter anticipated
per client fee")
End If
Worksheets("Analysis").Range("B20") = MyString
End Sub
J17 is a data validation check to make sure that the value entered in B20
matches a value in range B3:B13: =ISNUMBER(MATCH(B20,B3:B13,0))
Basically, I want Excel to check if J17 resolves to TRUE, and, if so, leave
the value in B20, else prompt for a value that matches a value in B3:B13.
What am I doing wrong here?
Thanks,
Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.
|