Stack overflow problem

Trickle

New Member
Joined
Feb 23, 2012
Messages
12
Hi All

I keep getting a Stack Overflow problem when the following code is run in an Excel sheet I'm using:

Private Sub Worksheet_Calculate()

If Range("AG1") > 0 Then Call Reset_Bet_Sheet1
If Range("J4") = "Y" Then Call Bf30Prices
If Range("AG2") > 0 Then Call Green

End Sub

I want the three macros to be triggered at different times over a fifteen minute period and have cell inputs set up on the sheet for this to trigger the macros, but it won't run because of the Stack Overflow issue.

Any help for a VBA novice would be much appreciated.

Trickle
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Obviously your error is in one of those three macros. I'm guessing you have a string that is too long or a declared integer that should be a long.
 
Upvote 0
If any of those macros changes the worksheet, then it retriggers the Change event, which re-runs the macro, which retriggers the Change event, ...

Disable events (Application.EnableEvents = False) in those routines before making changes, then enable events on exit.
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top