Hi all,
Does anyone know a bit of code that will load the colours of another excel sheet from a defined path
eg. i:ex/ex...
Printable View
Hi all,
Does anyone know a bit of code that will load the colours of another excel sheet from a defined path
eg. i:ex/ex...
Greetings,Quote:
Originally Posted by enfantter
Maybe just tired, but I think a bit more info needed. What do you mean by "load" the colors? Are you wanting code to grab colors from a given range in another workbook and replicate the layout in sheet whatever of ThisWorkbook, or build an array of color vals, or???
Mark
Cheers,
What i'm trying to do is to get the colour scheme defined in another book.
Tools > options > Color > copy colors from
Alternatively i would like to make a code that redefines the color scheme in excel
Is this better?
What version of Excel?
A one liner might do it:[vba]ThisWorkbook.Colors = Workbooks.Open("C:\Documents and Settings\Someone\My Documents\Logging.xls").Colors[/vba] but will leave open the workbook you're grabbing the colours from, so this might be a bit better:[vba]Application.ScreenUpdating = False
Set wb = Workbooks.Open("C:\Documents and Settings\Someone\My Documents\Logging.xls")
ThisWorkbook.Colors = wb.Colors
wb.Close False
Application.ScreenUpdating = True[/vba]