Sounds like something's wrong with your macro. Can you post the code with some clear explainations on what you expect it to be doing?
Sounds like something's wrong with your macro. Can you post the code with some clear explainations on what you expect it to be doing?
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
I use macro for buttons wich on click executes some calculations:
Sub Button1_Click()
Sheets("Sheet_1").Unprotect Password:=""
......
Sheets("Sheet_1").Protect Password:="", UserInterFaceOnly:=True, AllowFormattingCells:=True, Contents:=True
End Sub
I have 3 buttons in Sheet_1 and 2 buttons in Sheet_2. All of them have this lines of code at the beginnig and the end of macro.
Formating of unlocked cells must be possible.
Thanks for your help.
I put this line of code to module and problem solved
Private Sub Workbook_Open()
Dim wSheet As Worksheet
For Each wSheet In Worksheets
wSheet.Protect Password:="", _
UserInterFaceOnly:=True
Next wSheet
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks