VBA MOD01 GoTo Statement

 GoTo Statement


Sub Simple_GoTo()

Range("D3").Value = ""

If VBA.IsError(Range("B3").Value) Then GoTo GetOut

Range("C3").Value = Range("B3").Value

 Exit Sub

 GetOut:

    Range("D3").Value = "you have an error in the cell"

    Range("C3").Value = ""

   End Sub





Comments

Popular posts from this blog

VBA01 Copy Resize Variably Sized Ranges

VBA MOD01 Passing Arguments to sub procedures (ByRef , By Val)

PY MOD01 Lecture 01