ExcelSheet Worksheets Alignment Question

  • Thread starter Thread starter shortyes
  • Start date Start date
S

shortyes

Hi all,

Just need some help with a problem I am having. Currently I have an
access 2000 application that I am writing a function for. This
function basically takes data from the database, calculate what values
I need and then export that to an excel worksheet. The thing is I can
not find a list of syntax anywhere online aka

ExcelSheet.Worksheets(SheetName).columns("A")

..ColumnWidth Will change the width of the column
..Font.Name Will change Font
..insert Will insert a coln or a row

The first question is where can I find a comprehensive list of these?

The next is how do I do the alignment for the cell?
..alignment.hoizontal = "Center" does not work
nor does
..alignment = "center"
 
Last first

..HorizontalAlignment = xlLeft

First next

Alt + F11 to open Visual Basic Editor.

Help>Application Object and select it.

From the window that opens, click on "Properties" to open a list.

Start drilling down from there to look at Columns Property or Worksheet Property
and a host of others.

Also use the macro recorder to record yourself doing things.

Then look at the code developed.

In the above case you would have recorded left-aligning the column or cell and
generated the HorizonAlignment = xlLeft code along with a bunch of other
properties.


Gord Dibben MS Excel MVP
 
Back
Top