Hi Norman,
Both of your examples work great.
Thank you very much. I couldn't figure that one out.
Dave
Norman Jones Wrote:
Hi Dave,
Instead of using a public variable, you could also try:
Sub RunCode1()
MsgBox "Code1"
End Sub
Sub RunCode2()
MsgBox "Code2"
End Sub
Sub testoftoggle()
Static myToggle As Boolean
If myToggle Then
RunCode2
Else
RunCode1
End If
myToggle = Not myToggle
End Sub
---
Regards,
Norma
--
Desert Piranh
-----------------------------------------------------------------------
Desert Piranha's Profile:
http://www.excelforum.com/member.php...fo&userid=2893
View this thread:
http://www.excelforum.com/showthread.php?threadid=51757