Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Worksheetfunction does not function with object

Status
Not open for further replies.

Manuel10

Programmer
Nov 12, 2004
18
NL
Hello,

It seems to me that Worksheetsfunctions don't function at all when applied to an other excel object.
For example, while

Excel_Object.Workbooks(Bestandsnaam).Worksheets("Blad1").Range("J2:J10").Address

works properly, the next code

Application.WorksheetFunction.SumIf(Excel_Object.Workbooks(Bestandsnaam).Worksheets("Blad1").Range("J2:J10"), "<0")

simply does not work.
Can anyone confirm this, or am I doing something wrong here. (I actually hope the latter.) Thanks in advance.
Manuel Buys.
 
Hi,

Please post the code where you are using these statement fragments.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
Replace this:
Application.WorksheetFunction
By this:
Excel_Object.WorksheetFunction

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Hello Skip and PH,

The problem is resolved.
Kips, thanks for your offer to help.
PH, your suggestion was the solution to the problems. A very logical suggestion.

Thanks a lot!
Manuel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top