Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VBA - Simple I hope !  "Out Of memory"

Posted on 2014-01-30
7
Medium Priority
?
260 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 53

Assisted Solution

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

Is your code module also small?

Regards
0
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 500 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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 49

Accepted Solution

by:
Martin Liss earned 500 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

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

618 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