We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Out of Memeory Error

KeithAtWork
KeithAtWork asked
on
Medium Priority
178 Views
Last Modified: 2010-05-18
null
Comment
Watch Question

Author

Commented:
Adjusted points to 25

Commented:
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.

Commented:
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.

Commented:
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.

Author

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.

Commented:
I don't know if code applies to the limit, or has its own limit, or no limit.
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
Thanks for your help. I'll try it.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.