Dear DD, Pake Office berapa..? TerimaKasih.
Pada Senin, 22 Juni 2015 8:49, "Dede pmaho_l...@nabatisnack.co.id [belajar-excel]" <belajar-excel@yahoogroups.com> menulis: Dear Be Exceller, Mohon bantuan dan koreksi atas script warna merah dbi : Private Sub CommandButton1_Click() Dim a As String a = Sheet4.Range("b3").Value Dim p As String p = Sheet4.Range("s2").Value ‘Cell nama file Dim m As String m = Sheet2.Range("g2").Value ‘Cell nama file On Error Resume Next Worksheet.Active ActiveSheet.Unprotect Password:="a" Range("A3:B3").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("A6").Select Sheet5.Visible = True SheetVisible = Sheets("Persetujuan Pemusnahan BS").Visible = True Sheets("Persetujuan Pemusnahan BS").Select Range("B4:D4").Select Application.CutCopyMode = False Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("B4:D4").Select 'Application.CutCopyMode = False Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=True, Transpose:=True 'Application.CutCopyMode = False Range("a6").Select ActiveWorkbook.Save ChDir _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian" ActiveWorkbook.SaveAs Filename:= _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian\" & a & ".xlsb" _ , FileFormat:=xlExcel12, CreateBackup:=False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" Sheets("Monitoring BS").Select ChDir _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian" ActiveWorkbook.SaveAs Filename:= _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian\" & p & ".pdf" _ , FileFormat:=xlExcel12, CreateBackup:=False ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)" Sheets("Persetujuan Pemusnahan BS").Select ChDir _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian" ActiveWorkbook.SaveAs Filename:= _ "D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian\" & m & ".pdf" _ , FileFormat:=xlExcel12, CreateBackup:=False ActiveWindow.Close Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False ActiveWorkbook.Save ActiveWindow.Close End Sub Script merah saya dapat dengan copy paste record makro yang bertujuan untuk SaveAs ke filepdf, dengan lokasi penyimpanan file di"D:\BAD STOCK\2015\06 Juni 2015\Persetujuan Pemusnahan BS PMA GT-MT Nasional Juni 2015\Email Kirim ke Mr. Tian\Persetujuan Pemusnahan BS.pdf" dan satu file lagi dengan nama file “Monitoring BS.pdf” dilokasi yang sama. Masalah yang muncul adalah pada saat saya klik commandbutton tersebut hanya file excelnya saja yang terSaveAs otomatis, sedangkan kedua file pdf tidak. Mohon solusinya. Salam, Dede Sulaeman Logistic Staff PT. Pinus Merah Abadi This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of its author and do not necessarily represent those of NABATI or any of its subsidiary companies. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited. #yiv0977845493 #yiv0977845493 -- #yiv0977845493ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv0977845493 #yiv0977845493ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv0977845493 #yiv0977845493ygrp-mkp #yiv0977845493hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv0977845493 #yiv0977845493ygrp-mkp #yiv0977845493ads {margin-bottom:10px;}#yiv0977845493 #yiv0977845493ygrp-mkp .yiv0977845493ad {padding:0 0;}#yiv0977845493 #yiv0977845493ygrp-mkp .yiv0977845493ad p {margin:0;}#yiv0977845493 #yiv0977845493ygrp-mkp .yiv0977845493ad a {color:#0000ff;text-decoration:none;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ygrp-lc {font-family:Arial;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ygrp-lc #yiv0977845493hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ygrp-lc .yiv0977845493ad {margin-bottom:10px;padding:0 0;}#yiv0977845493 #yiv0977845493actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv0977845493 #yiv0977845493activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv0977845493 #yiv0977845493activity span {font-weight:700;}#yiv0977845493 #yiv0977845493activity span:first-child {text-transform:uppercase;}#yiv0977845493 #yiv0977845493activity span a {color:#5085b6;text-decoration:none;}#yiv0977845493 #yiv0977845493activity span span {color:#ff7900;}#yiv0977845493 #yiv0977845493activity span .yiv0977845493underline {text-decoration:underline;}#yiv0977845493 .yiv0977845493attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv0977845493 .yiv0977845493attach div a {text-decoration:none;}#yiv0977845493 .yiv0977845493attach img {border:none;padding-right:5px;}#yiv0977845493 .yiv0977845493attach label {display:block;margin-bottom:5px;}#yiv0977845493 .yiv0977845493attach label a {text-decoration:none;}#yiv0977845493 blockquote {margin:0 0 0 4px;}#yiv0977845493 .yiv0977845493bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv0977845493 .yiv0977845493bold a {text-decoration:none;}#yiv0977845493 dd.yiv0977845493last p a {font-family:Verdana;font-weight:700;}#yiv0977845493 dd.yiv0977845493last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv0977845493 dd.yiv0977845493last p span.yiv0977845493yshortcuts {margin-right:0;}#yiv0977845493 div.yiv0977845493attach-table div div a {text-decoration:none;}#yiv0977845493 div.yiv0977845493attach-table {width:400px;}#yiv0977845493 div.yiv0977845493file-title a, #yiv0977845493 div.yiv0977845493file-title a:active, #yiv0977845493 div.yiv0977845493file-title a:hover, #yiv0977845493 div.yiv0977845493file-title a:visited {text-decoration:none;}#yiv0977845493 div.yiv0977845493photo-title a, #yiv0977845493 div.yiv0977845493photo-title a:active, #yiv0977845493 div.yiv0977845493photo-title a:hover, #yiv0977845493 div.yiv0977845493photo-title a:visited {text-decoration:none;}#yiv0977845493 div#yiv0977845493ygrp-mlmsg #yiv0977845493ygrp-msg p a span.yiv0977845493yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv0977845493 .yiv0977845493green {color:#628c2a;}#yiv0977845493 .yiv0977845493MsoNormal {margin:0 0 0 0;}#yiv0977845493 o {font-size:0;}#yiv0977845493 #yiv0977845493photos div {float:left;width:72px;}#yiv0977845493 #yiv0977845493photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv0977845493 #yiv0977845493photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv0977845493 #yiv0977845493reco-category {font-size:77%;}#yiv0977845493 #yiv0977845493reco-desc {font-size:77%;}#yiv0977845493 .yiv0977845493replbq {margin:4px;}#yiv0977845493 #yiv0977845493ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv0977845493 #yiv0977845493ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv0977845493 #yiv0977845493ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv0977845493 #yiv0977845493ygrp-mlmsg select, #yiv0977845493 input, #yiv0977845493 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv0977845493 #yiv0977845493ygrp-mlmsg pre, #yiv0977845493 code {font:115% monospace;}#yiv0977845493 #yiv0977845493ygrp-mlmsg * {line-height:1.22em;}#yiv0977845493 #yiv0977845493ygrp-mlmsg #yiv0977845493logo {padding-bottom:10px;}#yiv0977845493 #yiv0977845493ygrp-msg p a {font-family:Verdana;}#yiv0977845493 #yiv0977845493ygrp-msg p#yiv0977845493attach-count span {color:#1E66AE;font-weight:700;}#yiv0977845493 #yiv0977845493ygrp-reco #yiv0977845493reco-head {color:#ff7900;font-weight:700;}#yiv0977845493 #yiv0977845493ygrp-reco {margin-bottom:20px;padding:0px;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ov li a {font-size:130%;text-decoration:none;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv0977845493 #yiv0977845493ygrp-sponsor #yiv0977845493ov ul {margin:0;padding:0 0 0 8px;}#yiv0977845493 #yiv0977845493ygrp-text {font-family:Georgia;}#yiv0977845493 #yiv0977845493ygrp-text p {margin:0 0 1em 0;}#yiv0977845493 #yiv0977845493ygrp-text tt {font-size:120%;}#yiv0977845493 #yiv0977845493ygrp-vital ul li:last-child {border-right:none !important;}#yiv0977845493