Hi there,
I would appreciate if you could see what I am doing wrong in the following
vb script:
I am running the following from the command line as "Start script.vbs". This script suppose to adjust a column width and add a freezepanes and save the changes. Currently it is asking a dialoge box and to see if I would like to save this file. The file also stays open and only opens in read only view.
' script.vbs
Dim objXL
Set objXL = CreateObject("Excel.Application")
With objXL
.Workbooks.Open ("D:\files\2.xls")
.Application.Columns("B").Select
.Application.ActiveWindow.FreezePanes = True
.Application.Columns("A:AE").Select
.Application.Columns("A:AE").EntireColumn.AutoFit
.Application.Rows("3:20").EntireRow.AutoFit
.Application.Quit
End With
Set objXL = Nothing
Much appreciate your help