Selecting checks via radiobuttons
Forums
Hi all,
I am trying to put together a script that lets me run a selected check on based on the appropriate VAT category by using radiobuttons. I tried basing the script on the one in the instructional video on this site, though i'm stuck at the radio buttons.
Can someone please give me some pointers as to how i can continue my script? The goal is that i can link a function to each of the selected radioboxes. I got to the part where i can select a file from the explorer to do my checks on, but now i need to assign checks to each of the radiobuttons. If i add extra case select numbers, it doesn't seem to link to any of the radioboxes, so there's probably some other way, but i have no idea how... :-)
The script is added as an attachment.
Best regards,
Dennis
Awesome, thanks!
Awesome, thanks!
I now added select case radiobutton after the first select case is ended, and messageboxes to check the outcome. However, there are two things i can't seem to fix. When i press cancel it ends the dialog but also shows the messagebox for the selected radiobox instead of killing the dialog, meaning that the test is run even if i cancel the dialog. Also, when I select a database it immediately starts running the selected radiobutton messagebox without me having to press "OK" first.
Is there a way to make the script hold all further actions until i press the OK button and not run functions when i press cancel or select a database? I added the latest version in the attachment.
Best regards,
Dennis
Hi Dennis,
Hi Dennis,
I fixed the problem with the radio button, what you need to do is put it under the select case for the ok button so that it only runs when the person selects ok. This also fixes the problem with the cancel and the select file option.
Let me know how it goes.
Brian
Hi Dennis,
Hi Dennis,
I updated your script with a variable for radioButton to hold the contents of the radio button. When you click on the ok button the script will capture the value of the radio button in the radioButton. So the variable will hold 0 if the first items is selected, 1 for the next, 2 after that and so on. You then can use a select case statement to do something with the variable.
Hope this helps.
Brian