Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I check if a sub function has been activated?

Status
Not open for further replies.

f1car

Technical User
Joined
Apr 2, 2001
Messages
69
Location
US
I'm playing with single click options and double click option with a timer, how can I tell if I've entered a sub routen?

Private Sub Timer1_Timer()
' Label1.Caption = Time ' Update time display.
Timer1.Enabled = False
Debug.Print fg1_dblClick
If fg1_dblClick = &quot;&quot; Then < i'm dead here
Load Form1
Form1.Show
End If
End Sub

Thank you.


 
If I understand the question correctly:
Why don't you set a variable in fg1_dblclick() which you can test afterwards? e.g.

private sub fg1_dblclick()
fg1_hasrun = True
<Rest of code>
end sub

then you can change your conditional line from
If fg1_dblClick = &quot;&quot; Then < i'm dead here
to
If not fg1_hasrun then

Does that help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top