Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Conditional Formatting

Hi there

My macro generates a Sales by Product by Customer PivotTable with 3
columns i.e. Product, Customer and Total.

Automatic subtotal are generated at each change of Product (Column A)

I then insert the following Conditional Format in the entire
PivotTable range which makes it look great.

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(RIGHT($A1,5)=""Total"",1,0)"
Selection.FormatConditions(1).Font.Bold = True
Selection.FormatConditions(1).Borders(xlLeft).Line Style =xlContinuous
Selection.FormatConditions(1).Borders(xlRight).Lin eStyle=xlContinuous
Selection.FormatConditions(1).Borders(xlTop).LineS tyle = xlContinuous
Selection.FormatConditions(1).Borders(xlBottom).Li neStyle =
xlContinuous
Selection.FormatConditions(1).Interior.ColorIndex = 15

As I said, it looks good on screen and in Print Preview.

However when I click on Print, message "EXCEL.exe has generated
errors and will be closed by Windows". I have tried on different PCs
as well as with different printers.

I am using Excel 2000.

Any way to resolve this or track why this is happening?

Thanks

Michael
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Conditional Formatting

Have you isolated the issue to the conditional formatting?

NO - Then do so. Perhaps run the code and at the end of the code, delete the
conditional formatting. Then print. If no error, you've essentially isolated
the issue.

YES - Well, your only hope is someone has seen this and opened a ticket with
MS and had it resolved. Your company MSDN administrator could open a ticket
if you have that support level. If not, you may be able to open one youself,
but it costs $.

Other thing you could try - run the code. save. close. reopen. print.
perhaps that will work and help further isolate the problem.

"Michael Rekas" wrote:

Hi there

My macro generates a Sales by Product by Customer PivotTable with 3
columns i.e. Product, Customer and Total.

Automatic subtotal are generated at each change of Product (Column A)

I then insert the following Conditional Format in the entire
PivotTable range which makes it look great.

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=IF(RIGHT($A1,5)=""Total"",1,0)"
Selection.FormatConditions(1).Font.Bold = True
Selection.FormatConditions(1).Borders(xlLeft).Line Style =xlContinuous
Selection.FormatConditions(1).Borders(xlRight).Lin eStyle=xlContinuous
Selection.FormatConditions(1).Borders(xlTop).LineS tyle = xlContinuous
Selection.FormatConditions(1).Borders(xlBottom).Li neStyle =
xlContinuous
Selection.FormatConditions(1).Interior.ColorIndex = 15

As I said, it looks good on screen and in Print Preview.

However when I click on Print, message "EXCEL.exe has generated
errors and will be closed by Windows". I have tried on different PCs
as well as with different printers.

I am using Excel 2000.

Any way to resolve this or track why this is happening?

Thanks

Michael

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
Conditional formatting--different formatting depending on cell con Tammy S. Excel Discussion (Misc queries) 3 March 30th 09 08:11 PM
Formatting cells in a column with conditional formatting? shamor Excel Discussion (Misc queries) 8 May 19th 08 10:11 PM
Protect Cell Formatting including Conditional Formatting Mick Jennings Excel Discussion (Misc queries) 5 November 13th 07 05:32 PM
conditional Formatting based on cell formatting Totom Excel Worksheet Functions 3 January 20th 07 02:02 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM


All times are GMT +1. The time now is 09:41 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"