Then may I suggest that you post your code so we can see. Else follow the logic of this layout
[VBA]
Sub RunMacro()
Sheet1.Unprotect Password:="Secret" ‘ß=== Change sheet name to suit
'Your Macro Code
Sheet1.Protect Password:="Secret" ‘ç=== Change sheet name to suit
End Sub
[/VBA]