Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory can't be read

Status
Not open for further replies.

netizen

Programmer
Aug 27, 2002
24
0
0
IN
I'm working with Excel 97 and VB6 using Excel object library. After generating the desired results, I'm closing down the excel object library using the following:

Dim oApp as Object
Dim oBook as object
...
...
...
set oApp = CreateObject("Excel.Application","")
set oBook = oApp.Workbooks.Add
...
...
...

some report contents to be printed to the work book opened using the Application object
...
...
...
set oApp = nothing
set oBook = nothing

At this point while closing the opened workbook it is not giving any error. But while closing the whole excel environment it is giving the GPF error : "The memory could not be read". with some address number!

can anyone help solve the problem?

thanks in advance
-Hari
 
Dos the oBook hace a close property/method you could use before setting it to nothing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top