Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto fit & horizontal alignment not working
I have some code that is not centering and formatting all of the columns. I
have coppied the snippet of code that his adjusting the alignment and autofit. Can anyone tell why the code is not formatting all of the cells? Columns("A:R").EntireColumn.Select With Selection.EntireColumn Cells.EntireColumn.AutoFit HorizontalAlignment = xlCenter VerticalAlignment = xlBottom End With Thanks!! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
auto fit & horizontal alignment not working
here's how i'd do it:
Dim ws As Worksheet Set ws = Worksheets("Sheet1") With ws.Columns("A:R") .AutoFit .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom End With -- Gary Keramidas Excel 2003 "petedacook" wrote in message ... I have some code that is not centering and formatting all of the columns. I have coppied the snippet of code that his adjusting the alignment and autofit. Can anyone tell why the code is not formatting all of the cells? Columns("A:R").EntireColumn.Select With Selection.EntireColumn Cells.EntireColumn.AutoFit HorizontalAlignment = xlCenter VerticalAlignment = xlBottom End With Thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Horizontal Scroll Bar Not Working | Excel Worksheet Functions | |||
what does "horizontal alignment = -4108" mean? | Excel Discussion (Misc queries) | |||
Horizontal Alignment | Excel Programming | |||
sumproduct w/horizontal range not working | Excel Worksheet Functions | |||
Cells(r, c) syntax and horizontal alignment | Excel Programming |