how to stop user interaction on ribbon while macro is running vba

Madhav Gadve (gmadhav) 0 Reputation points
2023-05-26T22:28:53.6366667+00:00

Hi Team,

We have our custom ribbon and we want to restrict user to click on ribbon button when a preview "button_OnAction" is still running. If user clicked on refresh button and its taking 5 seconds to complete operation then we want to freeze the ribbon until it gets completed. We just want to avoid use to click multiple times on the ribbon.

We have tried "Application.ScreenUpdating" and "Application.EnableEvents" but no luck.

System Details:

MacOS v: 13.1 (22C65)

Excel v: 16.72

Microsoft 365 and Office Development Other
Microsoft 365 and Office Install, redeem, activate For business MacOS
Microsoft 365 and Office Excel For business Windows
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.