actually terry i didn't explain what i am trying to do properly. i need to left align a few cells and i thought that it could be done through the autoformat function
on another note they were some awful results against the gunners, shocking
~M
>>hi all,
>>I am trying to tidy up an excel export program that i have. it all works ok but they layout needs a couple of tweeks. i am tryng to autoformat a cell but using the code below i get the error "... because you selected only one cell and the surrounding cells are blank, MS excel cannot determine which cells to apply the autoformat to"
>>
>>OleApp.Cells(lnCounter,1).AutoFormat()
>>
>>~M
>
>Mark
>
>I'm no expert at this but I recently did some formatting, with Boris's help. Would something like:
>
>With OleApp
> .Range("A2:A2").Select
> .Selection.Autoformat
>EndWith
>
>work?
>
>Terry
Go raibh maith agat
~M