Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Sep 2001
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Variant Array For Subtot (VB6 & Excel)

    I'm having brain lock trying to come up with the code to build a variant array to feed to a subtotal function for Excel.

    I want to be able to construct the array "on the fly" and not use the Array() func where the columns are listed as comma separated lits.

    I'd like the eventual code be something like:

    Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=varArray, _
    Replace:=True, PageBreaks:= _
    False, SummaryBelowData:=True

    where varArray is constucted in a loop where I test a range of columns to see if I want to include each in the subtotal..

    For some reason it is escaping me.... !!??

    Thanks for any pointers!

  2. #2
    Star Lounger
    Join Date
    Sep 2001
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Variant Array For Subtot (VB6 & Excel)

    Amazing what a walk outside will do...

    The fog has lifted - I guess I got wrapped around the axle but I've got it solved..

    Sorry for the post...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •