Forum Discussion

Petewilson's avatar
Petewilson
Contributor
13 days ago

Create a UserFrom via a script

Is it possible to create a Userform from a script. I already have a UserForm built for Testers so they can select different options for the test run.

  • Users select the application they want to run as we have variants, from a dropdown
  • Users select the location of their exe file, from a dropdown that is editable
  • There are a range of checkboxes below for each of the tests to toggle on or off
  • An OK and Cancel button

I wondered if there was a way to have a script that creates the UserForm when run, rather than manually creating?

 

 

  • Hassan_Ballan's avatar
    Hassan_Ballan
    Frequent Contributor

    Since as you can not create UserForm during run as rraghvani mentioned, probably the following would address your need.

    For testers to select different options for the test run, you can substitute UserForm with an Excel sheet (except for the Ok and Cancel).

    • Petewilson's avatar
      Petewilson
      Contributor

      Thanks rraghvani,

      I am using that already to handle the users choices of what tests to run as i build the tests up. I was hoping that it could be done via a script to make it more dynamic.

      Depending on the AUT selected, certain tests aren't valid and i can grey those out and uncheck them in that instance. It would be nice to have it scripted to hide them and adjust the coordinates of the those below so they are all in one list. Maybe if one is selected a list of sub test appears.

       

      • Marsha_R's avatar
        Marsha_R
        Moderator

        If the form is dependent on the AUT, then I believe what you could do is check for that AUT as you start the test and then display the correct form.