If I save the file as xla and use i as an add-in, I get runtime error 91 object variable or With block variable not set What should I changed ActiveSheet. into so that it reference the object properly? Any object reference with ActiveSheet. produces this error 91.
look here http://msdn.microsoft.com/en-u s/library/aa264 506%28v=vs.60%2 9.aspx
objField.Function = xlSum How can I create another column which calculates xlSum * 2 or Grand Total * 2?
How to specify the name of the Pivot Worksheet in VBA that is created by Sheet1.PivotTableWizard?
Now that I've downloaded the workbook, what do I do? Just looking at the workbook isn't too helpful :) I'm absolutely excited about the topic, but need help and want to follow along with a tutorial.
The tutorial for this is located at http://msdn.microsoft.com/en-u s/library/hh243 933.aspx you are supposed to read that and then come look at the code used in the tutorial. go to the developer tab and click the macros button. you can see all macros in the workbook. select the macro you want to study and click "step through" which allows you to see the code execute on the workbook line by line. press f8 to move to each new line of code. if you do this while reading the article it should help you to follow what is happening.