Sample Header Ad - 728x90

Why does it make a difference how I launch an Excel VBA application on Mac OS?

1 vote
1 answer
63 views
I have Office 365 on a PC running Windows 11 and on a Mac Mini running Sonoma. Both Office versions are up-to-date. I develop an Excel VBA application on Widows. After testing thoroughly, I copy the .xlsm file via OneDrive over to Mac for testing there. I have been doing this for several years with the same application, and have gone through many rounds of testing on both Windows and Mac. But something seems to have changed recently. Today, I ran the application on Mac in the usual way by double clicking the .xlsm file that I just brought over from the PC. The application halted with an Overflow error. In the Debugger, this assignment statement was flagged:
Dim i as Integer
i = 77
This obviously should not overflow. I was able to execute the line without raising an error by single stepping in the debugger. But when I let the program continue to run, it halted with an overflow at some other trivial assignment. Same story: single stepping in the debugger does not raise the error. I decided to try launching Excel in a different way. In Finder, I went to Applications, and double clicked Excel.app. In the Open window, I chose my .xlsm file. Now the application ran faultlessly. To make sure it wasn't a fluke, I ran the test several times this way and it worked every time. My question is this: On a Mac, what's the difference between (1) double-clicking an .xlsm file and (2) running Excel.app and then selecting the .xlsm file in the Open window?
john@Johns-Mac-mini ~ % ls -dleO@ /Users/john/Desktop/BTNS\ System\ Testing\ -\ Mac/March\ 2\,\ 2024/Process\ Profiler-129.xlsm
-rw-rw----@ 1 john  staff  - 308577 Mar  2 15:47 /Users/john/Desktop/BTNS System Testing - Mac/March 2, 2024/Process Profiler-129.xlsm
	com.apple.FinderInfo	    32 
	com.apple.lastuseddate#PS	    16 
	com.apple.macl	    72 
	com.apple.quarantine	    30
Asked by jisner (13 rep)
Mar 3, 2024, 02:35 AM
Last activity: Mar 3, 2024, 09:03 PM