PDA

View Full Version : Solved: Out of memory (Error 7)



Zephid15
04-11-2007, 08:18 AM
umm i just added a few more textboxes and i recived this message. i cant see my code or run the program. when i attempt to do either i get this error.

lucas
04-11-2007, 08:47 AM
You added textboxes to what.....? a userform. Can you post your Word document?

Zephid15
04-11-2007, 09:02 AM
i added text boxes to a userform. how would i go about posting my doc?

Zephid15
04-11-2007, 09:12 AM
nvm its too large. but i added quite a few textboxes to my user form. but when i went to run the program i got that message.

origionly i made a test userform to get all of the code. but when i went to make the full version with all of the products it seems to large. is there any way around this?

lucas
04-11-2007, 09:13 AM
Try again zeph,
Click on post reply...then scroll down till you see Manage attachments.
If it's too big you will have to zip it up.

Zephid15
04-11-2007, 09:17 AM
at work and my zip program is sub par, to say the least. give me a second and attempt to work with it.

Zephid15
04-11-2007, 09:20 AM
there lets see if that worked

5454

lucas
04-11-2007, 09:44 AM
It has something to do with the MCG Tab. I loaded the file and deleted the tab MCG and was able to work in the code from that point on. Not sure what the exact problem is though.

Tommy
04-11-2007, 11:16 AM
Hi Zephid15,

The first thing that pops in my little head is you have exceeded the 64k limit of defined variables, which in this case is incorrect. After looking at the file I see it is because you have loaded too many controls on the form which I believe exceeds the 64K limit, as suggested by Steve's post.

I noticed that the tabs all have the "same" look, other than the check box caption, in the upper left hand corner and the tab name. I was wondering if this was necessary? You can fill the textboxes etc with the same code just change the lables so the user doesn't get confused. Reduce all the tabs to just 2, and the second not showing up until the user checks the checkbox. :dunno

Another thing I noticed is you are depending on the checkbox.value to fire the change event, it doesn't always fire when the checkbox value is changed to false/0. I may have my object models confused so just a note of caution.:) A place to start looking if it doesn't work correct.

lucas
04-11-2007, 11:22 AM
Hey Tommy,
I had a feeling it was a limit by looking at it but was afraid to say that as I didn't know what they were.

Good to see you hanging around.....I'm leaving Fri for LA..oldest son is getting married. Will be gone for 10 days.

All well with you and yours?

Tommy
04-11-2007, 12:09 PM
Hey Steve, :hi:

I am always hanging around, just not logining in. :devil2: Ya'll are too quik, not giving me a chance to figure out the problem and then posting a solution. :rofl:

Married? Is he the one going to China? Has he gone and come back? See what happens when you let them out of your site?

I have one that is fix'into (this I think is either a Texas word or redneck not sure but it means fixing to or am going to) graduate from a bible college. Another one has all A's and B's was in the HS drill team and place 1st in a couple events in "nationals". I have no idea if it was the real nationals or if it was as close to nationals as they would get.:rofl: She got me on a football field and a basketball cort (Rockets pre-game show) to do a Daddy Daughter dance. I have never been so nervous in my life.

Other than that I just try to code it right the first time and spend a week or 2 to fix it. hehe

lucas
04-11-2007, 03:17 PM
The one getting married is my oldest.....China boy(my youngest) is still going strong in engineering curriculum at OSU.

I would have loved to have been there for the dance with your daughter....:devil2: Last time we went dancing it was to the Crocodile Rock..

I think we're lucky our kids are doing well...:hi:

Zephid15
04-12-2007, 06:24 AM
all the tabs look the same right now but when the code is done there will be different products under each tab. each tab has a product grouping and then each row is a different product. so i cant really condence it because a user may want to select a single product from each product grouping.

as for the 64 kb limit. is there any way to keep the form the way it is (for the most part) but lower the size?

and for the checkbox.value thing, this file i just threw together from the first test form that i made. first i made a form with just the ballbar and main tabs. i made sure everything worked correctly, and now i building the form for all of our products and getting issues.

thanks for all of your help btw.

Tommy
04-12-2007, 07:50 AM
I deleted the last 6 rows from each tab. Then it complained about a database.

Since you are using a database anyway have you thought about using the msflexgrid control? you would send the recordsource to the grid instead of having to fill in each textbox etc.

Keep in mind I have no idea what you are trying to do, I am just giving sugestions to confuse you more :rofl: . If you choose to use the flexgrid you could remove most if not all of the textboxes, allow the grid to grow or shrink according to the data retrieved. :dunno Just an idea.

Zephid15
04-12-2007, 08:07 AM
msflex grid sounds like a really good idea. i have never used it. how is the code for it?

Tommy
04-12-2007, 08:35 AM
There is a discussion here but it deals with excel. But it has a few pointers.
http://vbaexpress.com/forum/showthread.php?t=10916

Microsoft way http://msdn2.microsoft.com/en-us/library/aa228849(VS.60).aspx

I did a google search for msflexgrid and got 10 pages of results, LOL I misspelled it first and got 8 pages in several different languages :bug:

In order to get more specific I would need a database with some sample data, otherwise I would be just guessing.:banghead:

Zephid15
04-12-2007, 09:05 AM
alright sounds great ill look into it and see what i can change.

thanks for your help!

Tommy
04-12-2007, 09:09 AM
More than happy to help out. Let us know if you need more help.