View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave[_32_] Dave[_32_] is offline
external usenet poster
 
Posts: 8
Default Why doesn't this work in Windows NT & MS Office 97

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


--
Please type david.com inplace of no.thanks.
Sorry for the inconvenience but fed up of spam mail.