📊 Free Workbooks:
🥷Join Excel Ninja Pro: Months FREE On Annual Plan Auto Applied)
🥷Excel Ninjas FB Group: (Free downloads, Trainings, Live Q&A and more)
Save Excel Sheet as PDF with Simple Macro – ExcelVbaIsFun
Fantastic Developer Tools:
🔒 Transform Any Excel File Into A Locked EXE: (25% off with code ‘25OFF’)
🟡 Create Custom Installers:
👋 Business Inquiries, Consulting, Comments, etc: …(read more)
Convert Word 2 PDF: Word to PDF Converter
Convert PowerPoint 2 PDF: PPT to PDF Converter
Convert Excel 2 PDF: Excel to PDF Converter
Convert an Image 2 PDF: Image to PDF Converter
Convert HTML 2 PDF: HTML to PDF Converter
More Tools: PDF Converter
Can you please put the code here in the comment? 🙁
0:38 ye AKA kanye
My excel file has 1 sheet, including 2 pages. I need you to support vba code to create 2 PDF files, each page is a PDF file, save the resulting file in
In addition, there are other similar cases such as:
1/ All sheets
2/ Select any number of Sheets
Have a nice day
Sir Thanks, It is good. Can we save in PNG format instead of PDF & other things in coding are OK.
Waiting for your reply.
Thanks
Perfect tutorial, thanks.
Got a problem when my coworker runs my code similar ( inspired) to this code, we get an 1004 error, what am i doing wrong
How to save pdf with save dialog.? Please
How to create Excel to word documen
Thank you so much for your kind help!
Hello! Quick question, when I print my excel sheets to the pdf it cuts off the last three columns and prints them onto a separate page. How can program my code to force a "fit to page"/"shrink to fit" or at least have some control over what is cut off?
an error , show xlTypePDF =0 what to do
Hi.
pls can u help me with ( doing auto organization chart with vba ) .
very helpful but can you not record your trial and error process? thanks
If I want to make the filename dynamic like celvalue D13 followed by cellvalue D12 + date of today. How sould I add this in to the Macro?
how do you make the file name save in different names
got a question, i can print several documents through a sort of loop from a data validation list which is great. but i want to have the ability to saveaspdf as well. let me show you my code i have for printing through an iteration. maybe you can help me do the same for saveaspdf through a sort of iteration of some kind:
Sub Iterate_Through_data_Validation()
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Set xRg = ActiveSheet.Range("D1")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
For Each xCell In xRgVList
xRg = xCell.Value
ActiveSheet.PrintOut
Next
End Sub
Hello, do you know how to get and change coordinates of a specific text (Ex. "Figure 1" in the right coner of page, for example) on a PDF page. PDF page has only text. I am writing VBA code and cannot figure it out.
I'm Beginner in VB, Its very helpful in my off work. Thank you a lot
Sir I have use this code in vba. But error display on screen is "Run-time error 15, Invalid procedure call or argument ". Kindly guide me solve this error. And also I have check the code is many times,.
Hi sir
I am new to Excel vba & I often view yr vids, i need help for printer. I have to 2 computer in my office 1 is Prh-Pc & 2 is Asad-pc. Epson Printer is installed on 1pc & another receipt printer installed no2 PC. My Epson printer is connected to no2pc via dongle (same network). The problem is I want to change my default receipt printer to Epson Printer, when I save the PDF file with command button it saves in receipt printer format which is very long, I want to change to Epson printer in A4 size.how to code for it
Hi…. Really thanks for this video, I was finding this one line for whole day, Finally i made it because of this video, Thanks for making my day peaceful.
Can you please explain on how to have the file name change based on a cell in the actual document? This is what I am struggling with.
Every time when Trying to save .xlsm file to .pdf through macro button, the existing file was replacing with new one. how can I prevent it as I want to save files in different name. pls help…
is it possible to export password protected PDFs
USEFULL
When I made the macro. It only overwrites it when I save. How do I make it save a whole new file name every time I run the macro? Thank you.
hey there can you please help me. what am i doing wrong with this formula;sumnth = application.WorksheetFunction.SumProduct(–(MOD(COLUMN(.range("A" & LastRo & ":O" & LastRo))-COLUMN(.range("A" & lastRo))+1,2)=0),.range("A" & LastRo & ":O" & LastRo))
i get the error is "Expected expression"
This works great, I have my spreadsheet saving as a PDF file using a button, however, how do I get it so it saves a new file every time I click it instead of saving over the previous file?? please help
I am able to create the pdf without protecting it with password but i am looking to save file with pdf and password protected, when i do that i am not able to enable password. Can you show me how to record macro using password enabled macro…??please
SOLVED FROM ME!!!!
for everyone who may need this!!!
Sub export2pdf()
'
' export2pdf Macro
'
'
ThisWorkbook.Sheets(Array("a ian", "b ian", "a feb", "b feb", )).Select
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ActiveWorkbook.Path & Application.PathSeparator & "15imera" & Format(Date, "ddmmyyyy")
End Sub
———————-
SOLUTION:
change" Selection.Export…" to "Activesheet.Export…"
Here is the situation:
In main .xslb file I have multiple sheets like above. Everything works great except one thing: it exports ONLY the 1st pages of each sheet and not all the pages of each sheet.
example:
in sheet "a ian" there is only one page
in sheet "b ian" there are 3 pages
etc…
but it gives me in pdf file only the 1st page of each sheet.
Any help from you?
Thank you for your time.
Hi there, great explanation! I want to do the same thing; wrote a macro to convert a table and the graph it creates to a 1 page PDF. For some reason, it will save the table, though it won't save the graph. Strange right? I do this on my work, so when I switch computers with my colleague and log in to my own account, it suddenly does work and I have table with graph on a 1 page PDF. Unfortunately it has to work on my PC as well (as we our own in the office), do you know what I can do? Thank you so muc in advance!
Thank you so much! Works perfect