Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am accessing a Excel object from VB 6.0. To open the
object I use the following; Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Set xlApp = New Excel.Application Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets.Item(1) My problem when I use the following code; Set xlSheet = Nothing Set xlBook = Nothing Set xlApp = Nothing to close the object, the process is still runnig in the background in the process list. What do I do to remove it from the process list and actually close the object. I am using windows 2000 OS. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Mark,
You need to quit the application before clearing the object xlApp.Quit -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Mark" wrote in message ... I am accessing a Excel object from VB 6.0. To open the object I use the following; Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Set xlApp = New Excel.Application Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets.Item(1) My problem when I use the following code; Set xlSheet = Nothing Set xlBook = Nothing Set xlApp = Nothing to close the object, the process is still runnig in the background in the process list. What do I do to remove it from the process list and actually close the object. I am using windows 2000 OS. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you have probably created a non-releasable reference to excel in your code
(which you don't show). You must use fully qualified references to all objects so they can be released Rather than use ActiveSheet.Name = "ABC" you would use xlApp.ActiveSheet.Name = "ABC" as an example. This assumes that at the end of your code you set xlSheet = Nothing xlbook.Close SaveChanges:=False set xlBook = Nothing xlApp.Quit set xlApp = Nothing -- Regards, Tom Ogilvy "Mark" wrote in message ... I am accessing a Excel object from VB 6.0. To open the object I use the following; Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Set xlApp = New Excel.Application Set xlBook = xlApp.Workbooks.Add Set xlSheet = xlBook.Worksheets.Item(1) My problem when I use the following code; Set xlSheet = Nothing Set xlBook = Nothing Set xlApp = Nothing to close the object, the process is still runnig in the background in the process list. What do I do to remove it from the process list and actually close the object. I am using windows 2000 OS. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing workbooks w/o closing Excel | Excel Discussion (Misc queries) | |||
2 Label Options - Forms Object vs Control Box Object | Excel Discussion (Misc queries) | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
help !!!!.. Excel object not closing | Excel Programming | |||
Help on closing object properly | Excel Programming |