>
uTMP = GetObject('ResulQAS12.XLS')
>oXLSApp = createobject("Excel.application")
>with oExcel
> .workbooks.open('ResulQAS12.XLS')
> .ActiveSheet.Range("A:D").EntireColumn.AutoFit
> .ActiveWorkbook.Save
> .Quit
>endwith
If columns weren't adjacent then you could use either :
>Range("A:A","F:F","P:Z") (if not coding internationally) or oExcel.Application.Union(.Range("A:A"),.range("F:F"),.range("P:Z"))
>Cetin
Hi Cetin
Thanks for the tip. I think a line of code is missing where oExcel is asigned right before the WITH.
I added:
oExcel = uTMP.Application
right before the WITH.
I removed the CreateObject command as sugested on you next message.
However the open does not work with or without full path.
Does it works for you?
Thanks and regards
Oscar