Hello,
I am learning VBA and I have a question. I have 6 PDF files attached to a spreadsheet: Test1, Test2, Test3 and Practice1, Practice2 and Practice3. I am going to have an input box to ask the user, first, whether they want to open a Test or a Practice PDF, and then another input box asking them whether they want the number 1, 2 or 3. I will use only 2 application input boxes, one for type of PDF (Test or Practice) and one for number.
Based on result from the input I want the right PDF to be opened. The result of the input will be something like Test+3=Test3 or Practice+2=Practice2
I know the code to open the PDF in VBA but it uses a specific name for the PDF, “Object1” in this case.
How can I make the portion “Object1” as a variable so if the user inputs "Practice" and then number "1", the code above will open the “Practice1” PDF object?
Thank you for your help
Bookmarks