Solved

Out of Memeory Error

Posted on 1998-07-02
8
159 Views
Last Modified: 2010-05-18
null
0
Comment
Question by:KeithAtWork
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

803 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