Trouble switching to the M1 Mac or Excel in Office16.56

I just switched to the new Mac (M1 iMac 24", running the latest system) and updated excel to the most recent version 16.56.


Most of my Visual Basic for Applications (VBA) code no longer runs.


It's mystifying that something so simple as the below code bombs with an overrun (Runtime error 6) at the end of the loop.


Has anyone else experienced similar difficulties?


Sub a_test_digammad()
   
    For z1 = 1 To 4.01 Step 0.1
    Debug.Print z1, diGammad(z1)
    Debug.Print "---"
    Next z1  'BOMB LOCATION
End Sub

Function diGammad(x)
diGammad = x
End Function


iMac Line (2012 and Later)

Posted on Dec 23, 2021 4:10 AM

Reply

Similar questions

10 replies

Dec 30, 2021 2:39 PM in response to Keith Barkley

What I've learned so far:

The overrun error is associated with "debug.print".

  1. It seems to always (or nearly so) happen when the "debug.print" is in a For-Next or Do loop.
  2. It may happen when "debug.print" not in a loop.
  3. Typically the printing occurs and the error is flagged by the debugger on the following statement.
  4. Error is indifferent to Rosetta2
  5. Context: M1 iMac 24", Monterey 12.1, Excel 16.56

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Trouble switching to the M1 Mac or Excel in Office16.56

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.