Lock/unlock/color a Range based on the Value in another Range
Closed
PHSTOL
Posts
1
Registration date
Thursday September 19, 2013
Status
Member
Last seen
September 19, 2013
-
Sep 19, 2013 at 12:03 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 24, 2013 at 12:10 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Sep 24, 2013 at 12:10 PM
Related:
- Lock/unlock/color a Range based on the Value in another Range
- Wd drive unlock - Guide
- Ninja up unlock code ✓ - Android Forum
- Tetris unlock code ✓ - Android Forum
- Apple airtag range - Guide
- Nokia 105 games unlock code free ✓ - Nokia Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Sep 24, 2013 at 12:10 PM
Sep 24, 2013 at 12:10 PM
Hi Phstol,
There are different ways to execute/run a code.
One way is to create a module. Start of the code could be "Sub Name". Now you can manually run the code/macro called Name.
Another way is to put code in worksheet. Start of code could then be "Private Sub Worksheet_Change(ByVal Target As Range)". The code will now run whenever a change is made to the sheet.
Change your posted part of code into:
Best regards,
Trowa
There are different ways to execute/run a code.
One way is to create a module. Start of the code could be "Sub Name". Now you can manually run the code/macro called Name.
Another way is to put code in worksheet. Start of code could then be "Private Sub Worksheet_Change(ByVal Target As Range)". The code will now run whenever a change is made to the sheet.
Change your posted part of code into:
If Range("A1").Value = 1 Then
Range("B1").Locked = False
Else
Range("B1").Locked = True
End If
Best regards,
Trowa