Why doesn't this work in Windows NT & MS Office 97

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Please help...................................

Public Sub q()
On Error GoTo MError

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.workbooks.Open("C:\Test.XLS")
Set xlSheet = xlBook.Sheets("Sheet1")

Set xlSheet = Nothing

xlBook.Save

xlBook.Close
Set xlBook = Nothing
xlApp.Quit
Set xlApp = Nothing
End

MError:
MsgBox (Err.Description), vbCritical
End Sub
 
Dave

it would help if you told us what you want to happen and what it's not
doing.

Regards

Trevor
 
Back
Top