Excel tab to PDF calling value in another tab to attach reference PDF

FRIJOE

New Member
Joined
May 4, 2017
Messages
19
Hello

I have a form that is almost complete but I want to use a cell value (say cell b15 on sheet "Options") to attach a pdf titled the same thing. I want to press a button on the first sheet (sheet "Form") and have it convert sheet "Form" to a pdf, and attach the corresponding pdf for the cell value in cell b15 on the "Options" tab.

The location of the original file is located here: X:\R&D\JOE\Planning\

in the Planning folder there is an excel macro workbook titled: "Plan Form", as well as a folder containing all the reference PDFs titled: "Reference"

the Plan Form excel macro workbook has a series of tabs, I want to print the tab titled "Form" however the import value for the reference pdf is in the tab titled "Options"

So far I have:

Sub DTSsendtoChevron()

Dim FilePath As String
Dim FileNam As String
Dim MyDate As String
Dim Report As String

FilePath = "X:\R&D\Joe\Planning"
MyDate = Format(Date, "MM-DD-YY")
Report = "Plan Form "

FileNam = FilePath & Report & MyDate & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=FileNam, OpenAfterPublish:=True

End Sub



Any help is greatly appreciated.

Thank you very much!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,215,463
Messages
6,124,963
Members
449,200
Latest member
indiansth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top