Excel VBA - Coding a Msgbox and GoTO Exit Statement
Here is the code that is not working:
' If IsEmpty(Range("D3")) then msgbox("error") GoTo Ex end if
' Range("A6:I6").Insert Shift:=xlDown
What I want to do is verify that the user has entered data before performing the Range commands. If the cell D3 is blank I wish to display a Msgbox warning and then Exit the routine before the Range commands are processed. Thought I could accomplish this with the Msgbox and the GoTo but something is wrong with syntax. Appreciate any suggestions.