Path not found, but the folders do exist
[code] Sub toPDF() ' This will copy a specified range('s) from ws1 & ws2 to ws3. ' Now you can...
I believe the problem is that you are not getting the sFileName from the original workbook. So I have added ActiveWorkbook.Save...
Hello Ready2go This may only answer some of your question. The macro below will create a PDF file of Sheet2....
Dear Hyside2, I really appreciate your cooperation and helpful answer. Thanks so much.
Try this instead =IFERROR(LEFT(B1,FIND(" ",B1)-1),B1) [img alt_text='' description='']http://vbaf1.com/q/wp-content/uploads/2018/08/givenname.png[/img]
I am not sure if this is what you are looking for but test it out anyway. [img alt_text='' description='']http://vbaf1.com/q/wp-content/uploads/2018/08/1-2.png[/img]...
Oh! Please try this. You will need to change "Book1" on the line that reads (oFilename="Book1") to the name of...
I would highly appreciate if you help me to make VBA that saves Sheet2 as PDF and name it based on the data in Column B in Sheet1. Column B has many values, and I want to export number of Sheet2 same as number of Column B values.
The second thing, I want the exported pages to go to the directory file and every page merges with PDF file that has the same name of Column C in Sheet1.
Thanks in advance
This may only answer some of your question.
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim sPath As String
Dim Fname As String
Set ws1 = Worksheets("Sheet1")
Set ws2 = Worksheets("Sheet2")
sPath = ActiveWorkbook.Path
Fname = ws1.[B1]
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
sPath & "\" & Fname & ".PDF", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
I really thank your help and your continued support.
Please share using the share button above.
If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.
Found the answer useful and wants to credit the user, then vote the answer (vote up).
Enter the destination URL
Or link to existing content