View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Troubled User Troubled User is offline
external usenet poster
 
Posts: 85
Default Intentionally not validate Sub or Function

Is there anyway to write a Sub and step over or not evaluate the contained
Subs unless they are called. For example, in the following case I don't want
the system to look for the Sub named RuntheSub unless it is needed (passes
the if statement).

Private Sub Worksheet_Deactivate()
On Error Resume Next
If ShtTest.Range("Test") = "master" Then

RuntheSub

Else
End If
End Sub