Solved

Out of Memeory Error

Posted on 1998-07-02
8
161 Views
Last Modified: 2010-05-18
null
0
Comment
Question by:KeithAtWork
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Author Comment

by:KeithAtWork
ID: 1464856
Adjusted points to 25
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1464857
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
 
LVL 6

Expert Comment

by:alamo
ID: 1464858
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 4

Expert Comment

by:tomook
ID: 1464859
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
 

Author Comment

by:KeithAtWork
ID: 1464860
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
 
LVL 4

Expert Comment

by:tomook
ID: 1464861
I don't know if code applies to the limit, or has its own limit, or no limit.
0
 

Accepted Solution

by:
esdhem earned 20 total points
ID: 1464862
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
 

Author Comment

by:KeithAtWork
ID: 1464863
Thanks for your help. I'll try it.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question