LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JAC JAC is offline
external usenet poster
 
Posts: 31
Default Conditional Formatting

I have correctly applied conditional formatting to a number of cells
on a worksheet belonging to a workbook, involving named ranges and
formulae. All is well.

However, when I copy a range of cells (30 cells) from the worksheet to
another workbook using VBA using the following type of construct, I do
not get the result I desire.

' Paste the values, retaining the original formatting, etc

With rngDest
.PasteSpecial Paste:=xlPasteColumnWidths,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False
.PasteSpecial Paste:=xlPasteValuesAndNumberFormats,
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End With

The conditions for the conditional formats are carried over, including
the formulae and such named ranges that are essential to satisfy the
conditions.

However, all I intended to do was to carry over the resulting format
that should be applied to the pasted cells, not the conditions or the
formulae.

Does anyone know how I can do this? Can it be done by applying
different parameters to the PasteSpecial method?

Or, will I have to set the formatting myself on the worksheet after
pasting, taking note of the result of the conditional formatting?

Many thanks
 
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
Convert Conditional Formatting to Conventional Formatting [email protected] Excel Programming 0 October 11th 10 05:09 PM
How can I convert conditional formatting into explicit formatting? Patrick Harris Excel Discussion (Misc queries) 0 April 9th 09 12:00 AM
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 03:20 AM.

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

About Us

"It's about Microsoft Excel"