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...
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,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?
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
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]
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.