Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Preserve formatting setting in VBA crashing Excel

When I use the following peices of code together they
crash Excel saying "Method CurrentPage of object
PivotField failed", and then when I close Excel it
crashes.

ActiveWorkbook.Worksheets(wkSheet.Name).PivotTable s
(pvtTable.Name) _
.PreserveFormatting = True

ActiveWorkbook.Worksheets(wkSheet.Name).PivotTable s
(pvtTable.Name) _
.PivotFields("Line").CurrentPage =
sStr


But when I just use either one on its own its fine.

Any ideas?

Thanks,
Grant.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preserve cell formatting as SSN danhattan Excel Discussion (Misc queries) 2 August 30th 07 05:36 PM
Resize chart and preserve formatting (Excel 2007) aboeing Charts and Charting in Excel 3 June 27th 07 04:50 AM
How can I concatenate a number and preserve the formatting? [email protected] Excel Worksheet Functions 1 October 30th 06 10:40 PM
How to preserve formatting with vlookup Mathias Excel Discussion (Misc queries) 2 March 29th 06 10:36 PM
Preserve Formatting of pivot table crashing Grant Excel Programming 0 September 21st 04 03:21 AM


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"