(XL2007, Vista) My code creates a new workbook from a template (XLTM), copies an exisiting sheet in the new workbook, copies a range from another workbook, and then pastes this into the new worksheet.
Since my template already has all my formulas and conditional formatting, I'm using the following to paste in the data:
When I test the new worksheet, however, I find that some CF rules don't work. When I look at the CF manager, I find the rules have rearranged themselves. If I take the two misbehaving rules and manually move them back up wherre they're supposed to be, all is good.
Can someone tell me either:
-- how to prevent this from happening?
or
-- how to identify my CF rules and rearrange them after I'm done copying?
Thanks!!
Ed
Since my template already has all my formulas and conditional formatting, I'm using the following to paste in the data:
Code:
wks1.Range("A6:Q3000").Copy
wks2.Range("A6:Q3000").PasteSpecial xlPasteValues
wks2.Range("A6:Q3000").PasteSpecial xlPasteFormulasAndNumberFormats
When I test the new worksheet, however, I find that some CF rules don't work. When I look at the CF manager, I find the rules have rearranged themselves. If I take the two misbehaving rules and manually move them back up wherre they're supposed to be, all is good.
Can someone tell me either:
-- how to prevent this from happening?
or
-- how to identify my CF rules and rearrange them after I'm done copying?
Thanks!!
Ed