Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
private ResetTimer as Boolean
If ResetTimer then
'static variables are zeroed
ResetTimer = False
End If
Unload frmMain
frmMain.Show 'will reload it as well
Option Explicit
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static wombat
Debug.Print wombat
wombat = wombat + 1
Text1.Text = wombat
End Sub
Option Explicit
Private myForm As Form
Private Sub Command1_Click()
If myForm Is Nothing Then
Set myForm = New Form2 ' new instance, and thus reference count, to Form2
End If
myForm.Show
End Sub
Private Sub Command2_Click()
Unload myForm ' Note that this won't terminate the form
Set myForm = Nothing ' This will because it reduces ref count to 0
Set myForm = New Form2
myForm.Show
End Sub