View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
michaelberrier
 
Posts: n/a
Default Adding a Tab in a Macro

I've stepped through my code using F8 and have found an instance where
the code directs an Exit Sub if a certain cell is blank, but it is
continuing...here is the code.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Intersect(Target, Range("$b$7")) Is Nothing Then Exit Sub
'exit unless it Is c1 that changed

Call Module22.Look_Here1
'the macro To Call when c1 changes

End Sub

Cell B7 is empty, no values, no formulas, nothing, but the macro
proceeds to the next step and that's where it goes off kilter.

Any idea why it's doing that?