|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Linking to Forms using a CommandButton
hi guys how would I link from one form to another.
For example if i had Form1 as a contents page and I wanted to link from Form 1 to Form 2 using a CommandButton. How could I do that? Thanks in advance. Jason Sayers |
|
#2
|
|||
|
|||
|
What do you mean by "link to" and what version of VB are you working with?
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
like a hyperlink in HTML but in this case in my program, im using Microsoft Visual Basic 6.0 professional edition
|
|
#4
|
|||
|
|||
|
In your button click you can do something like
Code:
sub Command1_Click() dim f1 as myOtherForm set f1 = new myOtherForm f1.visible = true end sub Obviously there is some more housekeeping you'd have to do for real code. |
|
#5
|
|||
|
|||
|
Quote:
Wouldn't it be easier to just do: Code:
Private Sub Command1_Click() Dim f1 As New myOtherForm f1.Visible = True End Sub Or if you don't want it to allow a new instance of that form to popup, you could just use: Code:
Private Sub Command1_Click() myOtherForm.Show End Sub |
|
#6
|
|||
|
|||
|
Force of habit, I don't like using New in dim statements.
|
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Linking to Forms using a CommandButton |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|