Posts by Jo Azary

    This is weird. I have a workbook with macros working fine on Friday, Monday they don't. Behavior is it would loop through all the visible sheets, but never trigger the worksheet activate event except when I re-activate the sheet that was active when the code was triggered. Only thing I can think of is I deleted an unused sheet (Sheet2) sometime before end of day Friday. I may not have checked behavior after doing that (who knew?). I renamed the sheets so that I now have Sheet2, but that didn't fix it. It only works if I loop backwards; it might have skipped Sheet1 when looping backwards before I renamed them (don't recall).


    I suppose it doesn't matter which way I loop as long as it works, but it's so weird. Can't find anything similar online. Known "undocumented behavior"? Am I doing something wrong? Sorry if this is too long, I condensed as much as I could. Thanks in advance for your help!


    Here's the stripped down code:


    Individual sheets have this code:

    Code
    Private Sub Worksheet_Activate()
    'debug statement here showed it triggered outside of loop, but not within loop.
      If IsRunChecks Then
         'my code here
      End If
    End Sub