Do you have a reference set to Excel, or are you using Late Binding?
See whether it makes a difference if you use the actual value of
xlRight, -4152:
objXLSheet.Range("F1:F500").HorizontalAlignment = -4152
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Bob Barnes" <(E-Mail Removed)> wrote in message
news:A3B5901A-3175-4828-9C67-(E-Mail Removed)...
> How can I set HorizontalAlignment = xlRight
> of a Column or Range thru automation in Access VBA?
>
> Example...this works..
> objXLSheet.Columns("F:F").ColumnWidth = 14
>
> This doesn't...
> objXLSheet.Range("F1:F500").HorizontalAlignment = xlRight
>
> I am Formatting "Fixed" in an Access Query, but it always left-aligns
> in Excel.
>
> Any tips?
>
> TIA - Bob