Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

excel in visual basic

Status
Not open for further replies.

VBmim

Programmer
Jun 25, 2001
361
BE
How can I set the allignment property for some cells via vb.
I would want to do something like
excelapp.activesheet.range("g1:i1").alignment = center

mim
 
just do:

excelapp.ActiveSheet.Range("G1:I1").HorizontalAlignment = xlCenter

If you want can also use the VerticalAlignment property to align the cell contents vertically.

This should work for ya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top