<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306032#M63070</link>
    <description>Hi Kevin&lt;BR /&gt;
&lt;BR /&gt;
It will/would work, but it would take more effort. 8^)  I would like to give them the&lt;BR /&gt;
option with a yes/no/cancel messagebox to either apply and change, or not apply and change&lt;BR /&gt;
or cancel the change.   If the click event has fired I would have to have the name of the&lt;BR /&gt;
previous button stored, and have a Boolean or something in a routine to be able to return&lt;BR /&gt;
to it without refiring its click event code. I already have a Boolean to check if it is a&lt;BR /&gt;
form load click event and one to check if anything actually changed or not(to know if I&lt;BR /&gt;
need to fire the message box or not) so it starts getting a little messy.&lt;BR /&gt;
&lt;BR /&gt;
It probably is the best way out, but I was really hoping there was a way to do it before&lt;BR /&gt;
the change is made, and that is what the Validate event appears to be for. Unfortunately&lt;BR /&gt;
it is one of those hard to debug things where the click never happens if you step through&lt;BR /&gt;
it with F8, but does in normal run mode.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Kent&lt;BR /&gt;
Assistant Moderator&lt;BR /&gt;
Autodesk Discussion Forum Moderator Program&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Kevin Terry" &lt;KEVINT&gt; wrote in message&lt;BR /&gt;
news:B1A2214335680A79C551FC7E38EBD451@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Kent,&lt;BR /&gt;
&amp;gt; Will it work if you use the option button change event to set a form level&lt;BR /&gt;
&amp;gt; 'changed' boolean flag? Then just check this flag in the same event and call&lt;BR /&gt;
&amp;gt; a prompt function...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Kevin&lt;/KEVINT&gt;</description>
    <pubDate>Thu, 05 Jun 2003 07:44:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-06-05T07:44:41Z</dc:date>
    <item>
      <title>Option Button Validate</title>
      <link>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306030#M63068</link>
      <description>In a dialog I have 4 option buttons that when changed show stored values in a number&lt;BR /&gt;
of different controls.   If the user changes a value in one of the other controls and then&lt;BR /&gt;
tries to change option buttons without hitting apply, I want to prompt them with a&lt;BR /&gt;
messagebox.&lt;BR /&gt;
&lt;BR /&gt;
    Maybe some of the problems I am having are because this is in a addin dll ??  but if I&lt;BR /&gt;
use a normal option button the validate sub fires but the click event never does. (just&lt;BR /&gt;
like it works if you are stepping through code using the validate sub).  If I change the&lt;BR /&gt;
option buttons to graphical buttons then it works every time except the first.&lt;BR /&gt;
&lt;BR /&gt;
The form loads, I edit a textbox which sets a Boolean to notify the validate that&lt;BR /&gt;
something has changed, but then when I click a different option button the text change&lt;BR /&gt;
event fires again??, and the validate doesn't.   After that first time it works right.&lt;BR /&gt;
&lt;BR /&gt;
Is there a better way to do what I want.  If I put the code in the Mouse down event for&lt;BR /&gt;
the option buttons is there any way to cancel the click event for it?&lt;BR /&gt;
&lt;BR /&gt;
I imagine I could do it in the click event but it would take all kinds of Booleans and&lt;BR /&gt;
checks and storing the old button name etc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Kent&lt;BR /&gt;
Assistant Moderator&lt;BR /&gt;
Autodesk Discussion Forum Moderator Program</description>
      <pubDate>Wed, 04 Jun 2003 13:41:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306030#M63068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-06-04T13:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Option Button Validate</title>
      <link>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306031#M63069</link>
      <description>Kent,&lt;BR /&gt;
Will it work if you use the option button change event to set a form level&lt;BR /&gt;
'changed' boolean flag? Then just check this flag in the same event and call&lt;BR /&gt;
a prompt function...&lt;BR /&gt;
&lt;BR /&gt;
Kevin&lt;BR /&gt;
&lt;BR /&gt;
"Kent Keller" &lt;KENT&gt; wrote in message&lt;BR /&gt;
news:E0E99542CD1D331491C93EDD7B4453EB@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt;     In a dialog I have 4 option buttons that when changed show stored&lt;BR /&gt;
values in a number&lt;BR /&gt;
&amp;gt; of different controls.   If the user changes a value in one of the other&lt;BR /&gt;
controls and then&lt;BR /&gt;
&amp;gt; tries to change option buttons without hitting apply, I want to prompt&lt;BR /&gt;
them with a&lt;BR /&gt;
&amp;gt; messagebox.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     Maybe some of the problems I am having are because this is in a addin&lt;BR /&gt;
dll ??  but if I&lt;BR /&gt;
&amp;gt; use a normal option button the validate sub fires but the click event&lt;BR /&gt;
never does. (just&lt;BR /&gt;
&amp;gt; like it works if you are stepping through code using the validate sub).&lt;BR /&gt;
If I change the&lt;BR /&gt;
&amp;gt; option buttons to graphical buttons then it works every time except the&lt;BR /&gt;
first.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; The form loads, I edit a textbox which sets a Boolean to notify the&lt;BR /&gt;
validate that&lt;BR /&gt;
&amp;gt; something has changed, but then when I click a different option button the&lt;BR /&gt;
text change&lt;BR /&gt;
&amp;gt; event fires again??, and the validate doesn't.   After that first time it&lt;BR /&gt;
works right.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Is there a better way to do what I want.  If I put the code in the Mouse&lt;BR /&gt;
down event for&lt;BR /&gt;
&amp;gt; the option buttons is there any way to cancel the click event for it?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I imagine I could do it in the click event but it would take all kinds of&lt;BR /&gt;
Booleans and&lt;BR /&gt;
&amp;gt; checks and storing the old button name etc.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -- &lt;BR /&gt;
&amp;gt; Kent&lt;BR /&gt;
&amp;gt; Assistant Moderator&lt;BR /&gt;
&amp;gt; Autodesk Discussion Forum Moderator Program&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/KENT&gt;</description>
      <pubDate>Thu, 05 Jun 2003 03:42:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306031#M63069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-06-05T03:42:25Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306032#M63070</link>
      <description>Hi Kevin&lt;BR /&gt;
&lt;BR /&gt;
It will/would work, but it would take more effort. 8^)  I would like to give them the&lt;BR /&gt;
option with a yes/no/cancel messagebox to either apply and change, or not apply and change&lt;BR /&gt;
or cancel the change.   If the click event has fired I would have to have the name of the&lt;BR /&gt;
previous button stored, and have a Boolean or something in a routine to be able to return&lt;BR /&gt;
to it without refiring its click event code. I already have a Boolean to check if it is a&lt;BR /&gt;
form load click event and one to check if anything actually changed or not(to know if I&lt;BR /&gt;
need to fire the message box or not) so it starts getting a little messy.&lt;BR /&gt;
&lt;BR /&gt;
It probably is the best way out, but I was really hoping there was a way to do it before&lt;BR /&gt;
the change is made, and that is what the Validate event appears to be for. Unfortunately&lt;BR /&gt;
it is one of those hard to debug things where the click never happens if you step through&lt;BR /&gt;
it with F8, but does in normal run mode.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Kent&lt;BR /&gt;
Assistant Moderator&lt;BR /&gt;
Autodesk Discussion Forum Moderator Program&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Kevin Terry" &lt;KEVINT&gt; wrote in message&lt;BR /&gt;
news:B1A2214335680A79C551FC7E38EBD451@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Kent,&lt;BR /&gt;
&amp;gt; Will it work if you use the option button change event to set a form level&lt;BR /&gt;
&amp;gt; 'changed' boolean flag? Then just check this flag in the same event and call&lt;BR /&gt;
&amp;gt; a prompt function...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Kevin&lt;/KEVINT&gt;</description>
      <pubDate>Thu, 05 Jun 2003 07:44:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306032#M63070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-06-05T07:44:41Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306033#M63071</link>
      <description>Kent&lt;BR /&gt;
I see what you mean - for debugging such things I've sometimes put a 'stop'&lt;BR /&gt;
statement in the code after such a section, then F5 to 'run' through just&lt;BR /&gt;
that part and the code will break at the stop for you to continue stepping&lt;BR /&gt;
through. Not sure if that will help this scenario though - it may be the&lt;BR /&gt;
same behavior (read 'bug') will be evident that way as well. I've got an app&lt;BR /&gt;
kind of like this that I never did fully debug - it works ok, but since it's&lt;BR /&gt;
not really 'critical' I just left it in it's existing (half-a$$ed) state &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;
Sorry I can't help more...&lt;BR /&gt;
&lt;BR /&gt;
Kevin&lt;BR /&gt;
&lt;BR /&gt;
"Kent Keller" &lt;KENT&gt; wrote in message&lt;BR /&gt;
news:0205339B5A613DFE183DC7FDB4941EDB@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Kevin&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; It will/would work, but it would take more effort. 8^)  I would like to&lt;BR /&gt;
give them the&lt;BR /&gt;
&amp;gt; option with a yes/no/cancel messagebox to either apply and change, or not&lt;BR /&gt;
apply and change&lt;BR /&gt;
&amp;gt; or cancel the change.   If the click event has fired I would have to have&lt;BR /&gt;
the name of the&lt;BR /&gt;
&amp;gt; previous button stored, and have a Boolean or something in a routine to be&lt;BR /&gt;
able to return&lt;BR /&gt;
&amp;gt; to it without refiring its click event code. I already have a Boolean to&lt;BR /&gt;
check if it is a&lt;BR /&gt;
&amp;gt; form load click event and one to check if anything actually changed or&lt;BR /&gt;
not(to know if I&lt;BR /&gt;
&amp;gt; need to fire the message box or not) so it starts getting a little messy.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; It probably is the best way out, but I was really hoping there was a way&lt;BR /&gt;
to do it before&lt;BR /&gt;
&amp;gt; the change is made, and that is what the Validate event appears to be for.&lt;BR /&gt;
Unfortunately&lt;BR /&gt;
&amp;gt; it is one of those hard to debug things where the click never happens if&lt;BR /&gt;
you step through&lt;BR /&gt;
&amp;gt; it with F8, but does in normal run mode.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; -- &lt;BR /&gt;
&amp;gt; Kent&lt;BR /&gt;
&amp;gt; Assistant Moderator&lt;BR /&gt;
&amp;gt; Autodesk Discussion Forum Moderator Program&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Kevin Terry" &lt;KEVINT&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:B1A2214335680A79C551FC7E38EBD451@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Kent,&lt;BR /&gt;
&amp;gt; &amp;gt; Will it work if you use the option button change event to set a form&lt;BR /&gt;
level&lt;BR /&gt;
&amp;gt; &amp;gt; 'changed' boolean flag? Then just check this flag in the same event and&lt;BR /&gt;
call&lt;BR /&gt;
&amp;gt; &amp;gt; a prompt function...&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Kevin&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/KEVINT&gt;&lt;/KENT&gt;</description>
      <pubDate>Fri, 06 Jun 2003 04:14:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/option-button-validate/m-p/306033#M63071</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-06-06T04:14:47Z</dc:date>
    </item>
  </channel>
</rss>

