View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Toggle Code Calls

Hi Dave,]

At the top of the code module, before any code, insert:

Public myToggle As Boolean

Then try:

Sub RunCode1()
MsgBox "Code1"
End Sub

Sub RunCode2()
MsgBox "Code2"
End Sub

Sub testoftoggle()
If myToggle Then
RunCode2
Else
RunCode1
End If
myToggle = Not myToggle
End Sub


---
Regards,
Norman