Solved

VBA - Simple I hope !  "Out Of memory"

Posted on 2014-01-30
7
253 Views
Last Modified: 2014-01-31
THis could be fairly simple - I hope!  It could be basic syntax.

I have a simple form from which sub cboUpdateReport_Click() is called.

This code works well as I F8 through it.
However, after "End Sub" it gives "Out of Memory" error.

This is a very small workbook with no demands on memory.
Is there something wrong with the way my sub ends?
Why is it giving this error.


Private Sub cboUpdateReport_Click()
Stop


Worksheets("Controls").Cells(2, 7).Value = frmReportParameters.cboCompanyName.Text
Worksheets("Controls").Cells(3, 7).Value = frmReportParameters.cboYear.Text
Worksheets("Controls").Cells(4, 7).Value = frmReportParameters.cboPeriod.Text
Unload Me

End Sub


Private Sub cmdCancel_Click()
Stop
Unload Me
End Sub

Open in new window

0
Comment
Question by:Patrick O'Dea
7 Comments
 
LVL 50

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 125 total points
ID: 39823326
Hi,

Is your code module also small?

Regards
0
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 125 total points
ID: 39823416
That code should not give you an Out of memory error. Does your workbook have more code?
0
 

Author Comment

by:Patrick O'Dea
ID: 39823748
There is no other code in the workbook.

I notice that the workbook is almost 3 meg in size.

Would this be a problem?
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 27

Expert Comment

by:MacroShadow
ID: 39823876
The only other thing I can think of is formulas causing the error. Does it only err out when you run the code?
0
 
LVL 81

Assisted Solution

by:byundt
byundt earned 125 total points
ID: 39824025
There have been a number of questions on "Out of memory" problems recently. Microsoft is investigating the issue.

In the mean time, try rebooting your computer.
0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 125 total points
ID: 39824027
Is there any code in the UserForm_QueryClose or UserForm_Terminate events that refers to the UserForm?
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 39825388
Folks,

The matter seems to have resolved itself .... not sure why tho??
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

807 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