Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I encounter a problem, when setting the HorizontalAlignment of a range. Excel changes the alignment of all cells and not only the cells in the range. Here ist the code I use: Dim doc As Excel.Application Dim wrkbk As Excel.Workbook Dim wrksh As Excel.Worksheet Dim range As Excel.Range Dim style As Excel.Style doc = CreateObject("Excel.Application") doc.Visible = True wrkbk = doc.Workbooks.Add() wrksh = wrkbk.Worksheets(1) range = wrksh.Range("A1") style = range.Style style.HorizontalAlignment = Excel.Constants.xlCenter Could anybody help me? Thank's Jo |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
setting up networkdays | Excel Worksheet Functions | |||
Setting default pivot table field setting to "sum" | Excel Discussion (Misc queries) | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming | |||
Sending email via macro- setting the importance setting. | Excel Programming |