VBA: Exporting specific sheet to PDF-format - Mr. Excel
文章推薦指數: 80 %
VBA: Exporting specific sheet to PDF-format ... Allows me to select files from a list of .xls files in a folder. Open each selected file, ...
Forums
What'snew
Newposts
ExcelArticles
MrExcelPublishing
Login
Register
What'snew
Search
Newposts
Searchforums
Menu
Login
Register
Installtheapp
Install
Ifyouwouldliketopost,pleasecheckouttheMrExcelMessageBoardFAQandregisterhere.Ifyouforgotyourpassword,youcanresetyourpassword.
Forums
QuestionForums
ExcelQuestions
Youareusinganoutofdatebrowser.Itmaynotdisplaythisorotherwebsitescorrectly.Youshouldupgradeoruseanalternativebrowser.
VBA:ExportingspecificsheettoPDF-format
Threadstarter
madsmads
Startdate
Feb17,2015
M
madsmads
NewMember
Joined
Jan2,2011
Messages
27
Hiall,
Ineedassistancecreatingamacrothat:
Allowsmetoselectfilesfromalistof.xlsfilesinafolder.
Openeachselectedfile,andprintthesheetnamed"certificate"inaPDFformat,givingitthesamenameastheexcel-file.
ThecodeIamcurrentlytryingtoadjustisthefollowing:
DimwbNameAsString
WithApplication.FileDialog(msoFileDialogFilePicker)
.Title="STEP2:pressctrlandselectthefiles"
.Filters.Add"ExcelFiles","*.xls*"
.AllowMultiSelect=True
If.Show=TrueThen
Application.ScreenUpdating=False
ForEachvIn.SelectedItems
Setwb=Workbooks.Open(v,False,False)
'wbName=Replace(wb.Name,Left(wb.Name,8),"")
Application.DisplayAlerts=False
'wb.SaveAsFilename:=wb.Path&"\"&wbName
wb.Sheets("Certifikat").Activate'<<
延伸文章資訊
- 1Excel Macro to Save Sheets As PDF - Contextures
Export the Active Sheet as PDF File
- 2Print Multiple Excel Sheets to Single PDF File with VBA (6 ...
Apply Macro to Export Multiple Excel Sheets to PDF inside a Created Folder
- 3Excel VBA Save As PDF: Step-By-Step Guide And 10 Examples
- 4Print Multiple Excel Sheets to Single PDF File with VBA (6 ...
- 5Excel VBA to Export Selected Sheets to PDF - Stack Overflow
I'm using the following code to export selected sheets from Excel 2010 to a single pdf file... .....