PDA

View Full Version : Userform on Mac



gionny
05-28-2018, 12:50 AM
Hi guys,
I wrote some VBA code to use an Userform.
I often use Windows but sometimes I have to run the Userform on Mac (with Office 2016).
I wrote the following code for the Userform. It works perfectly on Windows but I have problems when I run it on Mac.
The part of the code I have troubles is:


With Application
.quit
.displayAlerts=true
end with


I need for that code because I want Excel Application to close when I click a button on the Userform.
I hope you can help me.

I want to highlight that I asked the same question on another forum, but I didn't receive the answer I was looking for.
I cannot attach the link because I am a new user here.
I hope it is not Cross-Posting.

thank you

Hightree
05-28-2018, 06:52 AM
What happens When jou remove the third line?

gionny
05-28-2018, 07:02 AM
Generally speaking, when I click the button, the userform should close and Excel too. This happens on Windows. What happens is that Mac crashes.
I think Mac (Office 2016) is not compatible with the istruction Application.Quit