 |
|
 |
iliekater Level: Master
 Registered: 04-02-2005 Posts: 125
|
Receiving "Out of memory" error message
Recently I got the "Out of memory" error message while editing and running a VBA form . I pressed Help and was provided with the possible causes , but I don't think I run in one of them . What I did observed however , is that this seems to happen becouse - as I suspect - I may have reached a maximum number of controls on the current form . Nevertheless , this is not absolute , since I observed that if I add carefully controls on the form , this doesn't always happen . You see , I add controls on that form by copying them from other forms and pasting them on the current one . So , if I copy the controls one by one instead of 10 together each time , I managed to add around 50 more controls (it's about image controls) ,, but it seems that it doesn't work anymore ... Now the error message shows up even if I copy the controls one by one ... Let me also specify here that it doesn't seem to be any controls having the same name (which should result in errors) .
So , I wonder if it is possible to add even more cotrols in the form without keep running out of memory ( ! ) .
[Edited by admin on 24-10-2007 at 04:24 PM GMT]
|
|
20-10-2007 at 12:08 PM |
|
|
JLRodgers Level: Moderator
 Registered: 04-04-2002 Posts: 1620
|
Re: Receiving "Out of memory" error message
In VB you're allowed 256 (give or take) controls based on a few sites I found, some say VBA is allowed around 1000 or so, others said they can handle up to 16,000.
Considering everything however, if a form actually uses that many controls, you probably need to redesign the form, or just break it into numerous smaller ones.
Since you mentioned image controls -- unless you have multiple images all visible at the exact same time, you could use just one control and change the displayed image.
____________________________
Everywhere's Local (classifieds, job postings, & more for everycity in the world - user entered)
|
|
20-10-2007 at 07:46 PM |
|
|
iliekater Level: Master
 Registered: 04-02-2005 Posts: 125
|
Re: Receiving "Out of memory" error message
Well I devided my form into two smaller ones as you adviced me .
|
|
24-10-2007 at 01:08 PM |
|
|
|
|
 |
 |