Posted to microsoft.public.excel.programming
|
|
syntax question
ok, i think it's because ws4 is not the active sheet, so the 2nd one fails.
thanks jim and jay
--
Gary
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i guess to be more exact:
this works
If Application.Sum(Range(ws4.Cells(2, x), ws4.Cells(lRow, x))) 0 Then
this doesn't
If Application.Sum(ws4.Range(Cells(2, x), Cells(lRow, x))) 0 Then
--
Gary
"Jim Cone" wrote in message
...
Gary,
If the ActiveSheet is ws3 both will work.
If the ActiveSheet is some other sheet both will blow up.
I guess in that regard they both function the same. <g
The preferred method is to prefix Range and Cells with the
worksheet...
ws3.Range(ws3.Cells(2, x), ws3.Cells(lRow, x))
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"Gary Keramidas" <GKeramidasATmsn.com
wrote in message
just wondering if these are functionally the same:
i = Range(ws3.Cells(2, x), ws3.Cells(lRow, x))
i = ws3.Range(Cells(2, x), Cells(lRow, x))
--
Gary
|