Microsoft
Software
Hardware
Network
Question : How do I create a macro to print all records in a Pivot Table with multiple page fields and dynamically set print area?
I need help with vba in a macro for an Excel pivot table. There are 2 parts to my to my request for help.
(1) I have a pivot table with 2 page fields. I need to print all page field combinations.
(2) The print area will change because some fields have more items than others, so I need to dynamically adjust the print area to accommodate this. Could you help with VBA code to accomplish this task? I have attached a sample file.
Answer : How do I create a macro to print all records in a Pivot Table with multiple page fields and dynamically set print area?
The page count resets itself when it prints, if you don't want others to see the values, add this after line 25
ws.range("H3").clearconten
ts
and to clear the printarea, put this on the next line
ws.PageSetup.Printarea = ""
Tom.
Random Solutions
Can files be copied programatically from SharePoint to another file system?
Screen Scramble in Excel 2003
Slow Windows 2003 Print Server
Determine if comboBox selectedIndex is changed programatically or by user?
Access 07 "encountered an error during setup" on a PC that has Office 07 standard already installed
SSIS error code DTS_E_CannotAcquireConnect<wbr />ionfromCon<wbr />nectionMan<wbr />ager
Outlook.Application. Trying to specify 'To' recipient by using the 'From' field.
Exchange 2003 SMTP conector
Silverlight File Upload with Progress Bar
IE7 and blank pages