S
Sara
I have made a questionnaire in excel which has drowdown lists, hidden rows
that pop up if you check certain cells, font and background change colors
according to the option button selection etc. This form is to be emailed to
our clients, and when i email it to others the security settings disable the
macros automatically on some computers. I have to find a way around this
because we can't tell each of our clients to change their settings. I am
thinking maybe protection the wooksheet may help?
I tried to protect part of the worksheet to see if I can still run the
macros, but it asks me for a password every time I click on the option button
(see code below). I don't want that since I will ultimately be hiding the
password and the code from the client. I just want them to be able to run the
macros and be able to type in the unlocked cells.
I made this form looking at onther one which is just like mine. It is
protected and emailing it doesnt cause the macro security issue. I am just
not sure how they did it since I don't have the password to unprotect their
sheet. Please advise...
Thanks
Private Sub OptionButton1_Change()
Worksheets("Job Info Sheet").Unprotect 'Password:="xyz"
If OptionButton1.Value = True Then
Range("A2934").Font.ColorIndex = 0
Range("E29:K34").Interior.ColorIndex = 0
Else
Range("A3333").Font.ColorIndex = 36
Range("E33:K33").Interior.ColorIndex = 36
End If
Worksheets("Job Info Sheet").Protect 'Password:="xyz"
End Sub
that pop up if you check certain cells, font and background change colors
according to the option button selection etc. This form is to be emailed to
our clients, and when i email it to others the security settings disable the
macros automatically on some computers. I have to find a way around this
because we can't tell each of our clients to change their settings. I am
thinking maybe protection the wooksheet may help?
I tried to protect part of the worksheet to see if I can still run the
macros, but it asks me for a password every time I click on the option button
(see code below). I don't want that since I will ultimately be hiding the
password and the code from the client. I just want them to be able to run the
macros and be able to type in the unlocked cells.
I made this form looking at onther one which is just like mine. It is
protected and emailing it doesnt cause the macro security issue. I am just
not sure how they did it since I don't have the password to unprotect their
sheet. Please advise...
Thanks
Private Sub OptionButton1_Change()
Worksheets("Job Info Sheet").Unprotect 'Password:="xyz"
If OptionButton1.Value = True Then
Range("A2934").Font.ColorIndex = 0
Range("E29:K34").Interior.ColorIndex = 0
Else
Range("A3333").Font.ColorIndex = 36
Range("E33:K33").Interior.ColorIndex = 36
End If
Worksheets("Job Info Sheet").Protect 'Password:="xyz"
End Sub