If... Then... Else with Multiple Actions

Is it possible to create an If...Then...Else statement with multiple actions under "Then" and "Else"?  I currently have the following code:

Dim frstmtgpymnt As Date
Dim lvertn As Boolean

frstmtgpymnt = DateAdd("d", 60, Sheet1.[z1E])

If (cleave1 = True And appleave1 = True And (IsEmpty(Sheet1.[z1DP]) Or Sheet1.[z1DP] > frstmtgpymnt)) Or _
(cleave2 = True And appleave2 = True And (IsEmpty(Sheet1.[z1IU]) Or Sheet1.[z1IU] > frstmtgpymnt)) Or _
(cleave3 = True And appleave3 = True And (IsEmpty(Sheet1.[z1NY]) Or Sheet1.[z1NY] > frstmtgpymnt)) Then _
    lvertn = True
    Sheet5.[A3].EntireRow.Hidden = False
    Sheet5.[A2].EntireRow.Hidden = True
Else
    lvertn = False
    Sheet5.[A3].EntireRow.Hidden = True
    Sheet5.[A2].EntireRow.Hidden = False
End If

Open in new window


I'm getting an Error at Else stating that I can't have an Else without If block (which I do, but perhaps with the wrong syntax).  Thanks in advance for any help.
Kimberly HelmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewCommented:
Don't continue after the THEN, do as:

Dim frstmtgpymnt As Date
Dim lvertn As Boolean

frstmtgpymnt = DateAdd("d", 60, Sheet1.[z1E])

If (cleave1 = True And appleave1 = True And (IsEmpty(Sheet1.[z1DP]) Or Sheet1.[z1DP] > frstmtgpymnt)) Or _
(cleave2 = True And appleave2 = True And (IsEmpty(Sheet1.[z1IU]) Or Sheet1.[z1IU] > frstmtgpymnt)) Or _
(cleave3 = True And appleave3 = True And (IsEmpty(Sheet1.[z1NY]) Or Sheet1.[z1NY] > frstmtgpymnt)) Then
    lvertn = True
    Sheet5.[A3].EntireRow.Hidden = False
    Sheet5.[A2].EntireRow.Hidden = True
Else
    lvertn = False
    Sheet5.[A3].EntireRow.Hidden = True
    Sheet5.[A2].EntireRow.Hidden = False
End If

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Kimberly HelmAuthor Commented:
Ha! Such a small change.  Thank you, very helpful!
0
Bill PrewCommented:
Welcome.


»bp
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.