VBA - Simple I hope ! "Out Of memory"

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

Patrick O'DeaAsked:
Who is Participating?
 
Martin LissConnect With a Mentor Older than dirtCommented:
Is there any code in the UserForm_QueryClose or UserForm_Terminate events that refers to the UserForm?
0
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

Is your code module also small?

Regards
0
 
MacroShadowConnect With a Mentor Commented:
That code should not give you an Out of memory error. Does your workbook have more code?
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Patrick O'DeaAuthor Commented:
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
 
MacroShadowCommented:
The only other thing I can think of is formulas causing the error. Does it only err out when you run the code?
0
 
byundtConnect With a Mentor Commented:
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
 
Patrick O'DeaAuthor Commented:
Folks,

The matter seems to have resolved itself .... not sure why tho??
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.