Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Vernon Day   on Jan 09 In MS Office Category.

  
Question Answered By: Amir Hashmi   on Jan 09

The main problem seems to be that you have 2 "If" statements and
no "End If" statements. "If" and "End If" must be in pairs. I can't
tell exactly what you want to do, but you may need "ElseIf"
or "Else".

Highlight your "If" statement and press F1 to see the help on this.

Also, you need to close your "Do" with "Loop".

Other Tips: If you haven't already, try using F8 to step through
your code. It is also very helpful to select "View - Locals Window"
to see all your variables while stepping code. Hovering the cursor
over variables also lets you see their value. These are alternatives
to the message box method.

Share: 

 

This Question has 4 more answer(s). View Complete Question Thread

 


Tagged: