M
mju
I am working on an excel pivot table macro. How do I get the macro to do a
measurement to drop an item from an array whenever it runs out of memory. I
got this error messageïƒ (Excel cannot complete this task with available
resources. Choose less data or close other application) and move to the next
item. The error always occurs in S_Number. How do I get it to drop S_Number
from the pivot table and continue with the rest of the macro?
The current macro includes it thus messing up my formatting.
Below is a sample of my code:
CHC = Array(Name, Size, Color, Logo, S_Number)
For x = 1 To z1
If CHC(x) = 0 Then GoTo Nex
H = H + 1
With ActiveSheet.PivotTables(PvtableName).PivotFields(FieldCodes(x + 5))
.Orientation = xlColumnField
' #2 .PivotItems("(blank)").Visible = False
.Subtotals = Array( _
False, False, False, False, False, False, False, False, False,
False, False, False)
' .ShowAllItems = True
End With
ST = FieldCodes(x + 5)
Nex:
Next x
measurement to drop an item from an array whenever it runs out of memory. I
got this error messageïƒ (Excel cannot complete this task with available
resources. Choose less data or close other application) and move to the next
item. The error always occurs in S_Number. How do I get it to drop S_Number
from the pivot table and continue with the rest of the macro?
The current macro includes it thus messing up my formatting.
Below is a sample of my code:
CHC = Array(Name, Size, Color, Logo, S_Number)
For x = 1 To z1
If CHC(x) = 0 Then GoTo Nex
H = H + 1
With ActiveSheet.PivotTables(PvtableName).PivotFields(FieldCodes(x + 5))
.Orientation = xlColumnField
' #2 .PivotItems("(blank)").Visible = False
.Subtotals = Array( _
False, False, False, False, False, False, False, False, False,
False, False, False)
' .ShowAllItems = True
End With
ST = FieldCodes(x + 5)
Nex:
Next x