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

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
 
T

Trevor Shuttleworth

Dave

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

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top