Hi abuali, Saya belum baca detail code dibawah tapi untuk menjawab pertanyaan Anda bs dites yg ini
Application.displayalerts = false Sheets("sheet1").unprotect password:="abc" Application.displayalerts = true Displayalerts disini adalah notifikasi yang muncul diakibatkan oleh code kita, jika false maka tidak akan muncul -----Original Message----- From: "abuali06062011" <abuali06062...@yahoo.co.id> Sender: belajar-excel@yahoogroups.com Date: Thu, 14 Jun 2012 08:54:26 To: <belajar-excel@yahoogroups.com> Reply-To: belajar-excel@yahoogroups.com Subject: [belajar-excel] Link Formula Pakai VBA ke beberapa workbook yang dipassword Saya mempunyai formula yang dibuat pakai VBA. formula ini merujuk kepada workbook lain yang tertutup dan berpassword. setiap saya link, maka workbook minta password. bagaimana cara memberikan password secara otomatis ke workbook tersebut? (tanpa membukanya) Terima kasih atas jawaban teman-teman. ini macronya: Sub Masukkan() GetNamaFile Range("Source") End Sub Public Sub GetNamaFile(sFolder As String) On Error GoTo SalahNama sfIleName = Dir(sFolder) Range("B5:H100").ClearContents Range("B5").Select Do While sfIleName > "" If Right(sfIleName, 4) = "xlsx" Then If Range("B4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$G$5" End If ActiveCell.Offset(0, 1).Select If Range("C4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$1" End If ActiveCell.Offset(0, 1).Select If Range("D4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$2" End If ActiveCell.Offset(0, 1).Select If Range("E4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$3" End If ActiveCell.Offset(0, 1).Select If Range("F4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$4" End If ActiveCell.Offset(0, 1).Select If Range("G4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$5" End If ActiveCell.Offset(0, 1).Select If Range("H4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$R$6" End If ActiveCell.Offset(0, 1).Select If Range("I4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$F$200" End If ActiveCell.Offset(0, 1).Select If Range("J4") = "Pakai" Then ActiveCell.Formula = "='" & Range("Source") & "[" & sfIleName & "]Sheet1'!$F$288" End If ActiveCell.Offset(0, 1).Select ActiveCell.Offset(1, -9).Select End If sfIleName = Dir() Loop Exit_Here: Exit Sub SalahNama: MsgBox "Mungkin folder atau nama file ada yang tidak resmi" Resume Exit_Here End Sub