Excel OLE Group function

Can anyone help with the group function in excel?

The group function has 4 parameters start, end, by, matrix. I can initiate a selection of a group using the following code:

CHWORKSHEET:Range("A2:H" + string(vrow + 3)):Group(
CHWORKSHEET:Range("B2:B" + string(vrow + 3)),,,).

My problem is however, that I can't get the last 3 parameters to work. The second I try to fill out one of the other parameters I recieve invalid range messages.

Can anyone provide me with an example? or explain why this happens?

Thanks

Andrew
 

NickA

Member
Thought I'd have a stab at this as no-one else appears to have replied. I haven't yet had the need to use this particular method.

Looking in VBA XL help, there are two forms of 'Group'.

The form of 'Group' you are trying to use requires a single cell in the pivot fields data range as the range object.

Presumably you'd have to build 'Periods' out of a MEMPTR?
 
Top