Solved

Out of stack space (Error 28)

Posted on 2016-11-26
5
20 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
  • 3
  • 2
5 Comments
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
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
Comment Utility
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 45

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
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
Comment Utility
Thanks!
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

728 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

10 Experts available now in Live!

Get 1:1 Help Now