Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Run-time error '28' out of stack space



I am facing "Run-time error '28' out of stack space" in solution provided under Title "Record Number of sum to formula based cell - Excel".

Can I request to please provide solution for the same.






There could be several reasons for this error (when your PC runs out of RAM)- do a Google search for causes and possible fixes.

It's impossible for us to work out the cause since that previous answer is a fairly simple macro but deals with changes to a remote file (by some means). It disables events to prevent retriggering but if you linked the files so the macro file then changes the remote file which triggers the macro again, you might cause an uncontrolled cascade of events.

Other causes might be recently installed software or a virus (and I note your recent unanswered question relates to a new Add-in - have you tried un-installling that?



Yes, the error is due to Add-ins. But I am looking for possible solution for the same. 
SunilA (rep: 42) Apr 22, '22 at 10:35 am
Good luck- I can't help with that (as stated previously)
John_Ru (rep: 3222) Apr 22, '22 at 10:38 am
I have checked the Run-time error '28' out of stack space is occurring in below coding mention:
"For Each Cll In Sheet2.Range("C3:C25")" from the title "Record Number of sum to formula based cell - Excel".

Is there any possibility to modify the existing code from Each to a Range, if possible.

SunilA (rep: 42) Apr 22, '22 at 1:09 pm
Sunil, I'm not certain that any of us has enough information to be able to give you a reliable solution - it would just be shooting in the dark. I suggest debugging your code and going through it line-by-line using F8 to step into it and see exactly what is happening - or put a break point at the start of the loop you mention and then step through that.
don (rep: 1979) Apr 22, '22 at 6:56 pm
Thanks Don for your message. I gone through the debugging of F8 where the function is working fine only the thing is the excel opens and closes at the start which I am unable to figure out why it is happening. 
SunilA (rep: 42) Apr 22, '22 at 10:23 pm
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login