I ran across some code on another site that is supposed to get the placement of the Excel application window on the screen of a Mac. The code can be found here:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=452#instr
It works on Excel 2011, but not on Excel 2019. The string variable scrRet is supposed to return either the placement of the window, or "error". When I run it on Excel 2019 for Mac, it just returns an empty string.
I did a Debug.Print of the string variable scr1, which holds the Apple Script text that will be performed to get the placement of the window. I took the output from the Immediate window and put that into the Script Editor and ran it, and it DID return the window placement. So the text of that string does work... it just isn't being returned from within VBA. I can't figure out why. Anyone have any ideas?
Or, does anyone know of a way to return the placement of the Excel application window another way?
http://www.vbaexpress.com/kb/getarticle.php?kb_id=452#instr
It works on Excel 2011, but not on Excel 2019. The string variable scrRet is supposed to return either the placement of the window, or "error". When I run it on Excel 2019 for Mac, it just returns an empty string.
I did a Debug.Print of the string variable scr1, which holds the Apple Script text that will be performed to get the placement of the window. I took the output from the Immediate window and put that into the Script Editor and ran it, and it DID return the window placement. So the text of that string does work... it just isn't being returned from within VBA. I can't figure out why. Anyone have any ideas?
Or, does anyone know of a way to return the placement of the Excel application window another way?