Pinaceous
Well-known Member
- Joined
- Jun 11, 2014
- Messages
- 1,124
- Office Version
- 365
- Platform
- Windows
Hi All,
I'm trying to figure out a way for a button click to lock a specified range of cells Then to Copy other specified cells.
I'm working with the following:
If you run this, you'll see what I'm talking about. It won't lock the specified range and then it won't copy the other range??
I can't seem to figure this one out.
Anyone have any suggestions on how to write this code??
Thanks,
Pinaceous
I'm trying to figure out a way for a button click to lock a specified range of cells Then to Copy other specified cells.
I'm working with the following:
Code:
Dim response As VbMsgBoxResult
response = MsgBox("ONCE YOU SELECT THIS BUTTON: IT WILL COPY THE INFORMATION AND LOCK THE SHEET!!! DO YOU WANT TO CONTINUE?", vbYesNo, "ProjectUpdate!")
Range("B11:U180").Select
ActiveSheet.Protect Password:="[EMAIL="G@cvXpcpSp96"]PASSWORD[/EMAIL]", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True
Worksheets(2).Range("C182:D182").Copy
Exit Sub
If response = vbNo Then
MsgBox " PLEASE MAKE SURE THAT Your info is UP-TO-DATE!", vbCritical, "ProtectUpdate!"
End If
End Select
Exit Sub
End Sub
If you run this, you'll see what I'm talking about. It won't lock the specified range and then it won't copy the other range??
I can't seem to figure this one out.
Anyone have any suggestions on how to write this code??
Thanks,
Pinaceous