0% found this document useful (0 votes)
12 views2 pages

VBA excel range

The document discusses a VBA code snippet for exporting an Excel range to a PDF file, highlighting issues encountered by a user. It suggests correcting the file path and name concatenation to ensure the PDF is saved correctly. Several responses provide troubleshooting tips and clarifications regarding the file location and naming conventions.

Uploaded by

nd0906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

VBA excel range

The document discusses a VBA code snippet for exporting an Excel range to a PDF file, highlighting issues encountered by a user. It suggests correcting the file path and name concatenation to ensure the PDF is saved correctly. Several responses provide troubleshooting tips and clarifications regarding the file location and naming conventions.

Uploaded by

nd0906
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
re 12/8028 vba - Export the Excel Range nto POF - Stack Overfow Export the Excel Range into PDF Asked 3 years, 8 months ago Modified 3 years, 2 months ago Viewed 1k times have been using this below code to save the range as pdf but it does not save it as pdf neither a gives an error. 0 Sub ExportAsPDOF() ~ Variables Dim Savefing As Range Dim pdfnane As String Dim path As String Setting range to be saved Set SaveRing = Sheet2.Range("A1:013") setting file name with a cell value pdfnane = Sheet2.Range("C1" path path = "C:\users\Jamini\pictures” ‘save the range as pdf Saveking.ExportAsFixedFornat Type:=x1TypePOF, _ Filename:spath & pdfnane & ".pdf” End Sub excel vba Share Improve this question Follow edited Oct 15, 2021 at 430 asked Apr 16, 2021 at 12:58 mares vuser14807564 753k 183 14k 15k 2. Ty inserting the path separator as Filenane:=path & "\" & pdfname & “.pdf" . Or build the path ‘ending in path separator, in this way: path = “C:\Users\Jamini\Pictures\" .~FaneDuru Apr 16, 2021 at 13:05 7 24 your pdfs probably in "C:\Users\Vamini" with the name Pictures and whatever you have in C1. =Warcupine Apr 16, 2021 at 13:06 Ihave checked the relevant folders but nothing is there @Warcupine — user14807564 Apr 16, 2027 at 13:09 1 Answer Sorted by: Highest score (default) e ‘ie:1/C:UsorsiAdministratoriOneDrive!Desktopvbaivoa - Export the Excel Range into POF - Stack Overiow him we re 12/8028 vba - Export the Excel Range nto POF - Stack Overflow Try inserting the path separator as: Filenans path & "\" & péfnane & °.pde” Or build the path ending in path separator, in this way: path = "C:\Users\2anind\pictures\" ‘And Warcupine is right, | think. You should find the created pdf in "C.\Users\Jamini" folder, but named as "Pictures" & pdfnane & ".pdt" Share Improve this answer Follow answered Apr 16, 2021 at 13:18 FaneDuru 422k 4 21 28 1 Thank you very much, Alright i understand the point now thank you. — user14807564 Apr 16, 2027 at 13:24 ‘ie:1/C:UsorsiAdministratoriOneDrive!Desktopivbaivoa - Export the Excel Range into POF - Stack Overiow:himl 22.

You might also like