Solved

VBA - Simple I hope !  "Out Of memory"

Posted on 2014-01-30
7
255 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 51

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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 47

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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

726 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