Center Userform in Excel script

Hi all

I have this script running with VBA code to position my user form in the center of the Excel window.
Working OK on two of my virtual machines but on my main machine where I create it and where it has always worked it give me a error now.

This is the link to my site
http://www.rondebruin.nl/mac/mac021.htm

And this is the script my VBA code create if the workbook that is open is named Workbook1

tell application “Microsoft Excel”
try
set rect to bounds of window “Workbook1”
on error
set rect to “error”
end try
end tell
return rect

Is there some plist file on my Mac that is the problem or so ?

Thanks

Hi Ron -

Unfortunately, your code works on my machine, too. Returns a list of 4.

Can you not control the userform’s centering to your satisfaction by the form’s native StartupPosition property?

…Mick

Thanks for your reply Mick

I have reinstall Office but this was not fixing it.
I think next week I reinstall my Mac complete.

Ron