[M2 MacBook Air, macOS Sequoia 15.6.1 (24G90), Microsoft Excel for Mac Office 365 Version 16.102.1 (25101829)]
In a new .xlsm workbook, with Personal.xlsb removed and no plug-ins enabled (i.e. fresh Excel), post laptop reboot - when I run the following code I get:
Run-time error '6': Overflow"
...with line x = i highlighted.
The Immediate window shows "1 1".
If I enter the debugger and step through the code, it runs properly to completion. I'm totally flummoxed!
Sub test()
Dim i As Integer
Dim x As Single
For i = 1 To 3
x = i
Debug.Print i & " " & x
Next i
End Sub
BTW, this issue was cross-posted at: https://www.mrexcel.com/board/threads/excel-vba-strange.1276111/#post-6285937 and https://learn.microsoft.com/en-us/answers/questions/5600456/excel-vba-strange-runtime-error-6-overflow?page=1#answer-12314316
Sub test()?