how do i center text in a cell using excel using a code rather th.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to center text in a field in excel but center using a code
rather than the center align button on the toolbar.
 
Lisa, something like this

Sub Center_Text()
With Selection
.HorizontalAlignment = xlCenter
End With
End Sub

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top