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

Memory & Handle leak setting button.enabled property

Status
Not open for further replies.

patljones

Programmer
Oct 4, 2001
6
GB
Is it just me? In NT I add two buttons to an Excel 2000 spreadsheet and the VB Code below. Open up task manager and alternately click on the buttons and the memory usage increments by 8K when you click and another 4K when you move the pointer off the button. It also uses up 4 handles every click. I tried the same thing in Excel 97 and its even worse. Am I doing something wrong?

Private Sub CommandButton1_Click()
CommandButton1.Enabled = False
CommandButton2.Enabled = True
End Sub

Private Sub CommandButton2_Click()
CommandButton1.Enabled = True
CommandButton2.Enabled = False
End Sub
 
Oops, its NTs (or Excel's) memory management leading me down the wrong path. If you click enough times or leave it long enough then the memory and the handles get freed up again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top