Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default VBA error: "object doesn't support this property or method"

D'oh! Ignore this. The error is due to a typo:

Application.InputsBox should be InputBox (no 's')!

Thanks,

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error "1004" Select method of range class failed Tallan Excel Discussion (Misc queries) 3 March 7th 07 06:22 PM
When hiding column error messge"Can'nt shift object off sheet" Rajeev Sharma Excel Discussion (Misc queries) 1 September 18th 06 01:27 PM
object reference does not support this property or method [email protected] Excel Discussion (Misc queries) 2 June 14th 06 07:23 PM
ddm enable/disable: Object doesn't support this property, my a** it doesn't William DeLeo Excel Discussion (Misc queries) 3 June 14th 06 06:57 PM
Object doesn't support this property or method (Error 438) Kiran Excel Discussion (Misc queries) 1 July 12th 05 08:42 PM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"