• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 169
  • Last Modified:

Out of Memeory Error

null
0
KeithAtWork
Asked:
KeithAtWork
1 Solution
 
KeithAtWorkAuthor Commented:
Adjusted points to 25
0
 
clifABBCommented:
I once saw a presentation by Dan Appleman on how to save memory (and speed up the form's loading) when using many controls.

Basically he drew pictures of the controls on the form and then used one "real" control moving it around the form as needed.
0
 
alamoCommented:
I've never used VB in Excel, so I don't know if it allows control arrays, but if it does maybe you can save some space by making the checkboxes a control array so you can process them more efficiently.

Another approach which sometimes works in VB (don't know if it's doable in Excel) is to move all the controls in one tab page to another form but use the Windows API "SetParent" to make it look like it's part of the main form.

It could also be the ideas you gave about moving code elsewhere will solve the problem more easily - I'm not saying they won't work, just throwing out some ideas from my VB experience if they don't.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
tomookCommented:
Since Excell does not allow control arrays, as a workaround you could use a tab strip instead of a tab control. You will only need as many check boxes as contained in the largest tab. When the tab strip changes, relabel and move the check boxes around. This will require a fair amount of code, but will reduce your control count.
0
 
KeithAtWorkAuthor Commented:
Thanks, tomook, a tab strip would work in this situation. However, could the additional code lead to another 64K limit error, or are you allowed more space in the code section? Just wondering.
0
 
tomookCommented:
I don't know if code applies to the limit, or has its own limit, or no limit.
0
 
esdhemCommented:
I think the multiple forms idea would offer the most flexability.
Tehy can be opened simultaneously by setting the MDI child property to true and using an MDI form to open multiple forms.
0
 
KeithAtWorkAuthor Commented:
Thanks for your help. I'll try it.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now