I have code to export / copy sheets to a new workbook. The issue is, some of the color formatting is missing. Can someone help answer why?
It is only an issue on the summary sheet where cells are highlighted a certain color. The color changes to a different color on a new sheet. Example... header cells are color 31,73,125.. however... on the copied sheet.. they are color 68,84,106
Is there a simple way to resolve this? Ty!
Code:
Sub Report6Export()
Dim Fname As String, ws As Worksheet
Dim Ary As Variant, tmp As Variant
Dim i As Long
Fname = "Review - " & Sheets("Instructions").Range("D5").Value
Ary = Array("Summary Page", Data Review", "Date Data Review", "Override Review", "Tenure Discrepancy Review", "Report - All Data")
tmp = Ary
For i = 0 To UBound(Ary)
If Not Evaluate("isref('" & Ary(i) & "'!A1)") Then
tmp = Filter(tmp, Ary(i), False, vbTextCompare)
End If
Next i
Sheets(tmp).Copy
For Each ws In ActiveWorkbook.Worksheets
With ws.UsedRange
.Value = .Value
End With
Next ws
With ActiveWorkbook
.SaveAs ThisWorkbook.Path & "\" & (Fname)
.Close
End With
End Sub
It is only an issue on the summary sheet where cells are highlighted a certain color. The color changes to a different color on a new sheet. Example... header cells are color 31,73,125.. however... on the copied sheet.. they are color 68,84,106
Is there a simple way to resolve this? Ty!