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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spreadsheet causing memory leak

Status
Not open for further replies.

WilliamWinn

Programmer
Jan 17, 2006
9
US
I have a spreadsheet on a form which is updated constantly.
The problem is that it is causing a memory leak.
Does anyone have examples of how to update the values in the spreadsheet without causing memory leaks?

thanks
 
Please give additional details regarding the following element:
... spreadsheet on a form ...
 
I have a form with a spreadsheet object on it.
The data is updated from data from a communications control.

When the comm control receives a certain message it is added to the spreadsheet by looping through all of the cells and added using code that looks like this:

.ActiveCell.Offset(1, 0).Select
.ActiveCell.Value = "some value"
.ActiveCell.Offset(1, 0).Select
.ActiveCell.Value = "some value"

I can open the task manager and watch the memory and handles grow & grow. If I comment out the code that updates the spreadsheet, the memory is good.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top