ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Radio Control Confirm problem (https://www.excelbanter.com/excel-programming/406441-radio-control-confirm-problem.html)

steve4446

Radio Control Confirm problem
 
I'm using radio buttons to switch between modes (New & Edit) in an Excel
Worksheet. Each of these modes has associated controls and code. When a user
switches between New & Edit, their "in-progress" changes will be lost. I want
to ask them to confirm that they want to do this and lose any unsaved
information.

I've been using a VB Yes/No box with the message ("Do you want to switch to
New/Edit and lose unsaved information?"). The problem is when the user
selects "No".

Here's a typical problem workflow. User is working in "New" mode. He clicks
the "Edit" radio button. The radio button is selected and on click() the
confirmation box pops up. User doesn't want to lose unsaved information, so
clicks no. Radio button reverts to "New" mode.

However, in reverting back to "New" mode, Excel now pops up the opposite
confirmation asking if the user wants to enter new mode, etc, etc. Clicking
"no" everytime leads to an endless loop.

Help?

Incidental

Radio Control Confirm problem
 
Hi Steve4446

Just in case... Are you exiting the sub after the user selects No???
i.e.

If Result = vbNo Then

Exit Sub

end if




All times are GMT +1. The time now is 08:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com