Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2006

Tip: Looking for answers? Try searching our database.

Conditional Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Rekas - 20 Jan 2006 06:08 GMT
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).LineStyle =xlContinuous
Selection.FormatConditions(1).Borders(xlRight).LineStyle=xlContinuous
Selection.FormatConditions(1).Borders(xlTop).LineStyle = xlContinuous
Selection.FormatConditions(1).Borders(xlBottom).LineStyle =
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
David Frette - 20 Jan 2006 20:21 GMT
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.

> Hi there
>
[quoted text clipped - 30 lines]
>
> Michael
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.