Excel causing

  • Thread starter Thread starter Berny
  • Start date Start date
B

Berny

I'm using VB to open and read/write to an Excel
spreadsheet. The spreadsheet is currently 2.9 meg. The
syntax I use is:
Public Const spdsheet
= "\\servername\mainfolder\subfolder\request_log.xls"

Set wkbook = GetObject(spdsheet)
Set wksheet = wkbook.Worksheets(1)
wkbook.NewWindow

I close the workbook using the syntax:
Set wkbook = Nothing
Set wksheet = Nothing

I can do this only a few times before getting a white
screen that says: "Excel out of memory". After
acknowleging this screen I usually get the Windows blue
screen and have to reboot my PC.

I would appreciate any suggestions:

Thanks,
Berny
 
Berny said:
I'm using VB to open and read/write to an Excel
spreadsheet. The spreadsheet is currently 2.9 meg. The
syntax I use is:
Public Const spdsheet
= "\\servername\mainfolder\subfolder\request_log.xls"

Set wkbook = GetObject(spdsheet)
Set wksheet = wkbook.Worksheets(1)
wkbook.NewWindow

I close the workbook using the syntax:
Set wkbook = Nothing
Set wksheet = Nothing

I can do this only a few times before getting a white
screen that says: "Excel out of memory". After
acknowleging this screen I usually get the Windows blue
screen and have to reboot my PC.

I would appreciate any suggestions:

Thanks,
Berny

Before you set the wkbook and to nothing
you should explictly close it and end the application
otherwise you are likely to have multiple Excel processes
running

wkbook.Close
xlapp.Quit

Keith
 
Back
Top