Hello, I was wondering if its possible to use VBA to change the color theme of a worksheet?
I am using the code below to create a new workbook and copy worksheets into this workbook from another workbook. Unfortunately, the workbook color theme in my initial workbook is set on "Violet" - with some cells colored purple for appearance. When the new workbook is created, it is set to the default - "Office" color theme - and my purple cells have turned to light blue.
Any thoughts on how to correct this?
I am using the code below to create a new workbook and copy worksheets into this workbook from another workbook. Unfortunately, the workbook color theme in my initial workbook is set on "Violet" - with some cells colored purple for appearance. When the new workbook is created, it is set to the default - "Office" color theme - and my purple cells have turned to light blue.
Any thoughts on how to correct this?
Code:
Sub Export()
Dim Sh As Worksheet, wb As Workbook, txt As String
Set wb = Workbooks.Add
On Error Resume Next
For Each Sh In ThisWorkbook.Sheets
If Left(Sh.Name, 9) = "Labor BOE" Then
Sh.Move After:=wb.Sheets(wb.Sheets.Count)
End If
Next Sh
On Error GoTo 0
txt = InputBox("Enter the Version Number or Date", "Export")
wb.SaveAs ThisWorkbook.Sheets("Home").Range("$F$9").Value & "_" & txt & ".xlsx"
MsgBox "BOE generation is complete."
End Sub