<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi Rolf,</p>
    <p>This works to close the wizard on button click after the last
      'page' as been reviewed.<br>
    </p>
    <p>Public Sub Wizard_Change()<br>
        <br>
        If Wizard.Index = Wizard.Count - 1 Then Me.Close<br>
        <br>
      End</p>
    <p>if you want to change the text of the last button use 
      Wizard.ActionText = "your close message"<br>
    </p>
    <p>Please note; that if you code the change routine as 'Private' it
      will not trigger on a change event.</p>
    <p>It will only trigger if set to 'Public' as per the example.</p>
    <p><br>
    </p>
    <p>Cheers,</p>
    <p>Ian.<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 6/9/19 3:24 pm, Fabien Bodard wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFkCsL5yt5vD4FuiTRmEABmBPGW5tZ2C_0xd_S3pkapLNv3vkA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>And if you try that ? :</div>
        <div><br>
        </div>
        <div><a
            href="http://gambaswiki.org/wiki/comp/gb.form/wizard/.change"
            moz-do-not-send="true">http://gambaswiki.org/wiki/comp/gb.form/wizard/.change</a></div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">Le ven. 6 sept. 2019 à 09:20,
          Rolf-Werner Eilert <<a href="mailto:rwe-sse@osnanet.de"
            moz-do-not-send="true">rwe-sse@osnanet.de</a>> a écrit :<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In
          a Wizard with 5 steps, I want to close the dialog when the
          user <br>
          clicks the button on the last step, i. e. step 5 when "OK" is
          shown.<br>
          <br>
          I tried Wizard_Click() and it reacts to every step<br>
          <br>
          Select Wizard.Index<br>
          Case 1<br>
          ...<br>
          Case 2<br>
          ...<br>
          Case 5<br>
             Me.Close<br>
          End Select<br>
          <br>
          But there is no reaction on step 5.<br>
          <br>
          Is there another event for the OK button?<br>
          <br>
          By the way, the documentation text for _Click is missing...<br>
          <br>
          Regards<br>
          Rolf<br>
          <br>
          ----[ Gambas mailing-list is hosted by <a
            href="https://www.hostsharing.net" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://www.hostsharing.net</a>
          ]----<br>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      -- <br>
      <div dir="ltr" class="gmail_signature">Fabien Bodard </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">
----[ Gambas mailing-list is hosted by <a class="moz-txt-link-freetext" href="https://www.hostsharing.net">https://www.hostsharing.net</a> ]----
</pre>
    </blockquote>
  </body>
</html>