• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Troubleshooting

What to Do If You Get an Error Message Saying a Variable Has Not Been Defined?

You have either typed Option Explicit in the General Declarations section of your module or you have selected to require variable declarations through the Options dialog box. Because of this you have to use a Dim statement to declare your variables. You tried to use a variable that had not been declared.

What to Do When You Type the First Line of Your If Statement and You Get a Syntax Error When You Press Enter

The message you see should tell you exactly what you did wrong. It states that it expected a Then or GoTo. You forgot to type Then at the end of the first line of your If statement. This is one of the most common typos in VBA.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint