Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Alignments using a reference worksheet
I have a worksheet the contains the formatting data for a secon
worksheet (without getting into why, this makes the most sense, i keeps my code very robust)... The reference worksheet contains different columns, one column ha color indexes for the second worksheet, the other has column width ANOTHER HAS CELL ALIGNMENT... when formatting my main worksheet, the code looks like: With Range(Rangename) .Interior.ColorIndex = ... (this line works) .ColumnWidth = ... .HorizontalAlignment = ..(HERE'S MY PROBLEM) End With The reference worksheet contains cells with either 'xlRight' 'xlCenter' or 'xlLeft'. But when the code above reads the referenc worksheet, it looks at the values as strings instead of variable names and doesn't understand... Does anyone know what I can do to my code s that it understands how to read the values i the reference a 'xlRight', 'xlCenter' or 'xlLeft' insead of strings? I figure I coul put in the actual integer values, but that'd make the worksheet ver hard for others to read, which i'm trying to avoid. Thanks, Vigg -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reference a cell to a worksheet?????????? | Excel Worksheet Functions | |||
WORKSHEET NAME = CELL REFERENCE | Excel Worksheet Functions | |||
How to reference cell in other worksheet | Excel Worksheet Functions | |||
Worksheet reference (i.e placing worksheet name in a cell) | Excel Worksheet Functions | |||
Reference a cell to get worksheet name | Excel Worksheet Functions |