Solved

VBA - Simple I hope !  "Out Of memory"

Posted on 2014-01-30
7
245 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 48

Assisted Solution

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

Is your code module also small?

Regards
0
 
LVL 26

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 26

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 80

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 45

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

744 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

11 Experts available now in Live!

Get 1:1 Help Now