#6893
Support 1
Participant

    You cannot use the FormVariables collection with an HTML Dialog. FormVariables is associated with a form posted from a Formativ Portal. Rather, you should use the Variables property of the HTMLDialog object, as shown in the following revision to your code.

       if (iHTMLButton = 1) then
          msgbox aDlg.Variables.Count
          Set iNumberCTL = aDlg.Variables.ItemByName("number")
          if not iNumberCTL is nothing then
             call msgbox(iNumberCTL.value, vbInformation, "Number")
          end if
       else
         ' msgbox "Cancel"
       end if
    
       ' --- Free up memory ---
       set aDlg = nothing
    

    Advansys Support