You need to maintain a flag ,and based on the flag value do what ever you want.
How do you do that?
Dim flag As Integer Private Sub Command1_Click() If flag = 0 Then Flag1 Else Flag2 End If End Sub Private Sub Flag1() MsgBox ("flag 0") flag = 1 End Sub Private Sub Flag2() MsgBox ("flag 1") flag = 0 End Sub
Is flag a variable?
Yes it is.
Is not that clear from the post #4 ?
I would declare the flag public and then give it a value based on what I need to do. Say for instance your user has added a new record to your database and you now need to take him back to the main form, do this -
'In a module, add the following... Public flag As Integer 'In your form you will use something like... Private Sub Command1_Click() 'You are finished with the data add, now give flag a value... flag = 1 End Sub Private Sub Command2_Click() If flag = 1 Then Form2.Show flag = 0 Unload Me Else 'flag = 0, do something here... MsgBox "What do I do now?" End If End Sub
I want to write out a DXF file with line arc and maybe spline.
My issue is documentation; While I have looked at AutoCAD's site I feel that there isnt ...
How to connect device scanner with visual basic, its analogy I made button scan in vb and typing button scan in press scanner live and walk .. how? Help ...
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then For Each subCtrl As Control In ctrl.Controls If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then MsgBox(subCtrl.Text) End If If subCtrl.GetType Is ...