View Full Version : Load colours from another sheet
enfantter
03-26-2009, 11:46 PM
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,
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
enfantter
03-27-2009, 12:42 AM
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?
mdmackillop
03-27-2009, 04:17 PM
What version of Excel?
p45cal
03-27-2009, 05:48 PM
A one liner might do it:ThisWorkbook.Colors = Workbooks.Open("C:\Documents and Settings\Someone\My Documents\Logging.xls").Colors but will leave open the workbook you're grabbing the colours from, so this might be a bit better: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
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.