Thread: Cell Alignment
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TripleT[_4_] TripleT[_4_] is offline
external usenet poster
 
Posts: 1
Default Cell Alignment

Hi again

I am using some code to automatically generate a validation list from a
named range. What I'd now like to do with the code is somehow tell it
some alignment, and wrapping parameters. Can anyone help me? The first
part of the code below works, the second doesn't.

'set validation for Enterer
With ActiveSheet.Cells(myRow, Enterer).Validation
..Delete
..Add Type:=xlValidateList, Formula1:="=Advisor"
End With

'set alignment and wrapping
With ActiveSheet.Cells(myRow, Enterer).Selection
..HorizontalAlignment = xlCenter
..VerticalAlignment = xlCenter
..WrapText = True
End With

Cheers.


---
Message posted from http://www.ExcelForum.com/