Macro Help

I need to pdf a series of forms (approx. 60) set up vertically in a line in a single worksheet.
The macro for doing that in itself is not an issue, however, there are one of four criteria applicable to each form (1-4) that apply.
I need to be able to pdf only the forms that satisfy criteria 1 or 2 or 3 or 4.
Any assistance as to how to do this would be appreciated.
Mike VellaAsked:
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.

Martin LissOlder than dirtCommented:
Select Case True
    Case <Criteria 1 satisfied>
       <Show PDF>
    Case <Criteria 2 satisfied>
       <Show PDF>
    Case <Criteria 3 satisfied>
       <Show PDF>
    Case <Criteria 4 satisfied>
        <Show PDF>
End Select

Open in new window


pls try something like this
Select Case <Criteria>
    Case <Criteria 1 satisfied>, <Criteria 2 satisfied>, <Criteria 3 satisfied>, <Criteria 4 satisfied>
        <Show PDF>
End Select

Open in new window


Experts Exchange Solution brought to you by ConnectWise

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
Mike VellaAuthor Commented:
Thanks to both respondents for their assist.
I ended up creating 4 macros (1 to 4) to take care of this rather than the one with the options.
With the associated code to cover the naming and filing of the PDF’s and the number of forms (I misspelled in my question - it was 160 forms not 60) it needed to cover - I have previously had issues where I created macros too long to run, so splitting made it easier to create and control.
End result works great.
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.

All Courses

From novice to tech pro — start learning today.