Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am building an Excel spreadsheet using VB.Net code. I want the vertical
alignment for all cells to be "Top". To know what code I'd need I turned on macro recording and went through the manual process. I got the following result ... Cells.Select With Selection .HorizontalAlignment = xlGeneral .VerticalAlignment = xlTop .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With I only care about the vertical alignment, so I am not trying to do any of the other stuff in VB.Net. Instead of the Cells.Select I found that in my code I'd need "objSheet.Cells.Select()" - that compiles and builds without error. It's the vertical alignment line that is causing me problems. "objSheet.Selection.VerticalAlighment = objApp.xltop" does not work because Selection is not a member of Excel._Worksheet and "objSheet.VerticalAlighment = objApp.xltop" does not work because verticalalignment is not a member of Excel._Worksheet. I'll appreciate any help anyone can offer. Thanks, Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Could someone HELP TRANSLATE this simple psuedo code into MACRO pl | Excel Programming | |||
Could someone HELP TRANSLATE this simple psuedo code into MACRO please?! | Excel Discussion (Misc queries) | |||
translate ws formula to vba code | Excel Programming | |||
Macro translate from number to text | Excel Programming | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |