I have been using this code in a macro for a while. Today I switched it to a command button. Now I get this error:
"Run time error '1004'
Select Method of Range class failed"
Please Help.
Thanks
"Run time error '1004'
Select Method of Range class failed"
Please Help.
Code:
Private Sub CommandButton4_Click()
' Add City
Sheets("Budget Price").Select
ActiveSheet.Unprotect Password:="password"
--> Range("A21").Select
Selection.EntireRow.Insert
Sheets("City List").Select
Selection.Copy
Sheets("Budget Price").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, contents:=True, Scenarios:=True, Password:="password"
End Sub
Thanks