Solved

Out of Memeory Error

Posted on 1998-07-02
8
158 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now