Multiple IF statements, macro stops at first True

Joined
Dec 12, 2014
Messages
1
Reaction score
0
Hello,
I made an Excel worksheet to look like a paper form and used data validation to create dropdown lists for some of the cells. I then made a macro with 16 If statements referring to those cells:

If Range("C11") = "English Literature" Then
Workbooks.Open "E:\Advising_Forms\Literature Checklist.xlsm"
End If
If Range("C12") = "Film Studies" Then
Workbooks.Open "E:\Advising_Forms\Film Checklist.xlsm"
End If


...and so on for all options in cells C11, C12, C14 and C15. I've tested each of these statements and they all work correctly, but if the statement is true for more than one of these cells the macro stops at the first true statement. For example, if C11 does say "English Literature" and C12 does say "Film Studies", only the Literature Checklist will open. There are no errors, it just stops.

To further my confusion, I first tried this as a command button with the macro written in Object Sheet1 and everything worked. I recreated it as a Module and assigned it to a shape (button) and it does not work.

Can anyone explain why?
 

Attachments

  • Save_Form.txt
    2.3 KB · Views: 422

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top