Sheets.Unprotect not working
Everything's happening on the same sheet. The With format doesn't work
either.
I did narrow it down to the specific cell that's causing it. It's the
target cell of the dropdown box, where the choice is put. At this
point, I've left it unlocked as it just won't unprotect it. I'm
thinking the dropdown box performs the input to the target cell before
Excel realizes it's a macro, therefore coming to a halt due to
protection before the macro has a chance to unprotect it.
Sound logical? It's the only thing I can think of and seems like a
sortof goofy thing if it's true.
On Oct 10, 3:12 pm, "Don Guillett" wrote:
It could be that you are unprotecting the COPY sheet instead of the
DESTINATION sheet.
Sub dovalue()
With Sheets("sheet4")'Destination sheet
.Unprotect
.Range("a1").Value = _
Sheets("sheet3").Range("a2").Value
.Protect
End With
End Sub
--
Don Guillett
SalesAid Software
"mike" wrote in ooglegroups.com...
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- Hide quoted text -- Show quoted text -
|