What I am totaling is currency.
I have set x to currency, double, long and as a variant
Has no bearing on setting x
all return same error
compile error: Argument not optional with subtotal highlighted
> What are you trying to do??? You have declared X as long. Then you try to
> assign it to the Subtotal Method of the range. What number were you
[quoted text clipped - 21 lines]
>>
>> End With
Subtotal is a method of a range. It inserts rows into the range and adds
subtotal lines. It does not have a return value. It transforms the range. So
it does not matter how you declare x since subtotal does not return anything
to put in x. So what are you trying to do.

Signature
HTH...
Jim Thomlinson
> What I am totaling is currency.
> I have set x to currency, double, long and as a variant
[quoted text clipped - 28 lines]
> >>
> >> End With
Jim Thomlinson - 12 Dec 2007 00:03 GMT
Specific to your Argument not optional question. Subtotal has 3 required
arguments. GroupBy, Function and TotalList. You have only listed 2... Group
by and Function. What is the list of columns that you want totaled??? Even if
you supply that list it still will not return a value or object to x...

Signature
HTH...
Jim Thomlinson
> Subtotal is a method of a range. It inserts rows into the range and adds
> subtotal lines. It does not have a return value. It transforms the range. So
[quoted text clipped - 33 lines]
> > >>
> > >> End With
treasuresflemar - 12 Dec 2007 21:32 GMT
I was trying to use subtotal like sum in the workbooks. Brain Fart.
I got it working with Application......Sum()
Thanks for
> Subtotal is a method of a range. It inserts rows into the range and adds
> subtotal lines. It does not have a return value. It transforms the range.
[quoted text clipped - 36 lines]
>> >>
>> >> End With