?
Solved

Out of stack space (Error 28)

Posted on 2016-11-26
5
Medium Priority
?
143 Views
Last Modified: 2016-11-29
Attempting to modify VBA to suit my Userform template in the attached file for column references but getting Out of stack space (Error 28) and Excel crashes.

Any assistance as to why this is happening would be greatly appreciated.

Paul
Test_Userform7.xlsm
0
Comment
Question by:Paul Clayton
[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
  • 3
  • 2
5 Comments
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41902398
What action do you take that results in the error? Is it associated with clicking one of the buttons for example?
0
 

Author Comment

by:Paul Clayton
ID: 41902752
The run error occurs and thereafter Excel shuts down when I try to change the VBA code to reflect the worksheet column that I want as the txt box value on the Userform, i.e., as below from 6 to 12
        .txtPMthRev = Format(ws.Cells(lRw, 6), "#,##0.00")

Open in new window

to
        .txtPMthRev = Format(ws.Cells(lRw, 12), "#,##0.00")

Open in new window


Paul
0
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 total points
ID: 41902758
Here's what I did. I changed .txtPMthRev = Format(ws.Cells(lRw, 6), "#,##0.00") to .txtPMthRev = Format(ws.Cells(lRw, 12), "#,##0.00") in the LoadBoxes sub. I then went into Visual Basic, selected the userform and pressed F5. I then get an error when Form_Initialized called LoadBoxes because of the #N/A cell L2, but after ignoring that I was able to click "Next Record" more than 30 times and did not have a problem. What did you do different if anything?
0
 

Author Closing Comment

by:Paul Clayton
ID: 41905644
Thanks!
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 41905949
You're welcome and I'm glad I was able to help.

If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.

Marty - Microsoft MVP 2009 to 2016
              Experts Exchange MVE 2015
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

649 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