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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any way to align columns different

Status
Not open for further replies.

JESTAR

Programmer
Feb 13, 2002
213
GB
can i align the first column left and the rest center
 
Yes.
Columns("A:A").HorizontalAlignment = xlLeft
Columns("B:Z").HorizontalAlignment = xlCenter
 
Sorry, was a bit brief in my question, but thanks for replying.

What I need to do is this, in VBA for Excel. My UserForm has a listbox that has 10 Columns. I can vertically align the text in all columns with...

ListCars.TextAlign = fmTextAlignCenter

But that does every column. I need Column 1 (the first one on the left) to be left aligned (vertically), and the rest to be center aligned (vertically).

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top