VBA: Exporting specific sheet to PDF-format - Mr. Excel

文章推薦指數: 80 %
投票人數:10人

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'<<



請為這篇文章評分?