Dear Mr Toby,
Terima kasih masukannya, akan saya coba dan pelajari terlebih dahulu. Salam, DD From: Toby kenzo [email protected] [belajar-excel] [mailto:[email protected]] Sent: 18 Juni 2015 11:29 To: [email protected] Subject: Bls: [belajar-excel] Tidak bisa Locked Range Dear DD, Coba buat commonButton dan masukan program ini: Dim jmlhbaris As Integer jmlhbaris = Sheet4.Range("C4").Value ActiveSheet.Unprotect Password:="a" Sheet4.Range(Cells(6, 3), Cells(jmlhbaris, 3)).Select Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect DrawingObjects:=False, _ Contents:=True, Scenarios:=False, _ AllowFormattingCells:=True, _ AllowFormattingColumns:=True, _ AllowFormattingRows:=True, _ AllowInsertingColumns:=True, _ AllowInsertingRows:=True, _ AllowInsertingHyperlinks:=True, _ AllowDeletingColumns:=True, _ AllowDeletingRows:=True, _ AllowSorting:=True, _ AllowFiltering:=True, _ AllowUsingPivotTables:=True ActiveSheet.Protect Password:="a" TerimaKasih. Pada Kamis, 18 Juni 2015 9:37, "Dede [email protected] [belajar-excel]" <[email protected]> menulis: Dear Be Exceller, Mohon bantuannya untuk koreksi makro ini : Sub Macro4() Jmlhbrs = Range("a1").Value Range("a2").Select For i = 1 To Jmlhbrs ActiveCell.Offset(1, 0).Select j = ActiveCell.Value On Error Resume Next Workbooks.Open Filename:="D:\BAD STOCK\Master\STD-STM PMA - Copy.xlsb" ActiveSheet.Unprotect Password:="a" Range("a6").Value = j Range("c4").Value = s Range("" & s & "+1,1:C100").Select Selection.Locked = False Selection.FormulaHidden = True Range("c6:" & s & "").Select Selection.Locked = True Selection.FormulaHidden = True ActiveSheet.Protect Password:="a" ChDir "D:\BAD STOCK\Email" ActiveWorkbook.SaveAs Filename:="D:\BAD STOCK\Email\" & j & ".xlsb", _ FileFormat:=xlExcel12, CreateBackup:=False ActiveWindow.Close Next i End Sub Harapannya pada saat makro dijalankan, kolom C pada file terlampir dimana terdapat kode barang maka range tersebut dalam keadaan ter-“Locked”. Demikian dan terima kasih. Salam, DD _____ 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.

