Although I don't know how efficient my code is, I managed to work it out. I now have the code below, I also change the background colour of the cells depending whether they are locked or not.
Of course all my knowledge gain here is from the homework from previous code that I have learned of you guys, so thank you so much for all your past efforts. 
Now I just need to tweak the code so that it can be called from muliple sheets. 
EDIT: Solved that also, changed all the 'Sheet1' references to 'ActiveSheet'.
Below is the code:
Sub Protect()
Dim i As Integer
Sheet1.Unprotect "Password"
'My Code starts here
If Range("A8:B20").Locked = False Then
Range("A8:B20").Locked = True
For i = 8 To 20
Cells(i, 1).Interior.ColorIndex = 35
Cells(i, 2).Interior.ColorIndex = 35
Next i
Else
Range("A8:B20").Locked = False
For i = 8 To 20
Cells(i, 1).Interior.ColorIndex = 2
Cells(i, 2).Interior.ColorIndex = 2
Next i
'My Code ends here
End If
Sheet1.Protect "Password"
Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
Sheet1.EnableSelection = xlUnlockedCells
End Sub
Bookmarks