View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Sheets.Unprotect not working

Nothing terribly off that I can see (assuming you have a sheet called Order).
Give this a whirl...

Sub DropDown43_Change()

with Sheets("Order")
.Unprotect
' CAPTURE Thickness
.Range("G4").Value = .Range("IG_Unit_Thickness").Value
.Protect
End With
End Sub


--
HTH...

Jim Thomlinson


"mike" wrote:

I've got the following macro tied to a dropdown box. It's a copy/paste
macro to move the chosen value to another cell, which is protected. For
some reason, it's not unprotecting. I haven't a clue why... this seems
so simple. There is no password and other macros are running fine on
this same sheet.

Sub DropDown43_Change()

Sheets("Order").Unprotect

' CAPTURE Thickness
Range("G4").Select
Selection.Copy
Range("IG_Unit_Thickness").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False

Range("F3").Select

Sheets("Order").Protect

End Sub