|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Random Form Load
Hi guys, I'm extremely new to VB, I actually just started yesterday. I worked all day yesterday and am satisfied with my progress, but I have ran into a snag that I cannot figure out for the life of me. So if anyone could help I would appreciate it very much. Ok, this is what I'm trying to do. Here is the page setup.
There are multiple Option Buttons on the screen. I have the code set to unload the form and load another form when one of the options is chosen and the command button is clicked. So my code says something like this: Private Sub Command1_Click() If Button1.Value = True Then Unload Form1 Load Form2 Form2.Show Else MsgBox "Please Select Another Option" End If End Sub What I need to learn code for is a random generator of some sort that will allow when I click the command button it will load either Form2 or Form3 depending on a variable. I hope I explained my problem sufficiently, again, any help would be greatly appreciated. Rich |
|
#2
|
|||
|
|||
|
For what u r doing this?. Can I assume u have only two forms(From2 and Form3)?
|
|
#3
|
|||
|
|||
|
For this example, there are only two options, later on I might have more than two though, but for now I only have the form1 going to either form2 or form3. This is just for a little project for my job. Thank you.
|
|
#4
|
|||
|
|||
|
I've got it figured out, thanks.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Random Form Load |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|