Hai Kesi,

Protect sheet yang bisa insert comment adalah dengan mengatur agar *Drawing
object tidak di-protect*.
Sheets("nama sheetnya").protect "passwordnya", *false*

Wassalam,
Kid.




On Mon, Jul 21, 2014 at 10:43 AM, KESI VIZZIANTI [email protected]
[belajar-excel] <[email protected]> wrote:

>
>
> Adakah yang salah dengan perintah di bawah ini?
> waktu di lock kok tidak bisa insert koment di cell ya?
>
> Private Sub CommandButton1_Click()
> Dim wSheet As Worksheet
>
> For Each wSheet In Worksheets
> On Error GoTo akhir
> If wSheet.ProtectContents = True Then
> wSheet.Unprotect Password:=TextBox1.Text
> teruskan:
> Else
> wSheet.Protect Password:=TextBox1.Text, AllowFiltering:=True,
> Scenarios:=True
>
> End If
> Next wSheet
> Exit Sub
> akhir:
> MsgBox wSheet.Name & " : passwordnya salah !!!bukan : " & TextBox1,
> 48, "oops!"
> GoTo teruskan
> End Sub
>
> --
> *Kesi Vizzianti*
> Email [email protected]
> Phone 0812-77176028
> Blog http://kesivizzianti.blogspot.com/
> Twitter KesiVizzianti <https://twitter.com/KesiVizzianti>
>  
>

Kirim email ke