View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default VBA error: "object doesn't support this property or method"

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.