ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to protect option button? (https://www.excelbanter.com/excel-programming/326261-how-protect-option-button.html)

Julie

How to protect option button?
 
Good day everybody,

I have an entry form created using Excel XP. There are two sections in this
form.
User 1 will fill the first section and protect the worksheet which will
protected the 1st section from being changed. This form will be send to User
2 to fill the second section.
However, the option buttons in 1st section are still able to be click and
thus option is changed.
How do I protect the option button from being changed?
I was told it can't be done and have to use VBA. Can anyone guide me how to?

Thank you in advance and have a nice day.

Best regards,
Julie

Tom Ogilvy

How to protect option button?
 
If linked to a cell, if both the cell and the control are locked and the
sheet and objects are protected (3 options under worksheet protection), then
it should resist being clicked on.

--
Regards,
Tom Ogilvy


"Julie" wrote in message
...
Good day everybody,

I have an entry form created using Excel XP. There are two sections in

this
form.
User 1 will fill the first section and protect the worksheet which will
protected the 1st section from being changed. This form will be send to

User
2 to fill the second section.
However, the option buttons in 1st section are still able to be click and
thus option is changed.
How do I protect the option button from being changed?
I was told it can't be done and have to use VBA. Can anyone guide me how

to?

Thank you in advance and have a nice day.

Best regards,
Julie




Julie

How to protect option button?
 
Hi Tom,

Thank you for your response. I have try it. The link cell will not change
value and message will said the cell you are trying to change is protected.

This will not change link cell value, but however, the option button will
change.
Now the option button and the link cell are not in line. This will create
problem for me to know which is the right result.

Do you have any clue how to solve this?

Hope to hear from you again.

Best regards,
Julie

Tom Ogilvy

How to protect option button?
 
Your correct - that is the behavior in Excel 2003. It is not the behavior
in Excel 97. These are the two versions I tested. So I suspect not.
However, as to the correct value, obviously it is what is shown in the cell
as, as you have said, it doesn't change.


--
Regards,
Tom Ogilvy

"Julie" wrote in message
...
Hi Tom,

Thank you for your response. I have try it. The link cell will not change
value and message will said the cell you are trying to change is

protected.

This will not change link cell value, but however, the option button will
change.
Now the option button and the link cell are not in line. This will create
problem for me to know which is the right result.

Do you have any clue how to solve this?

Hope to hear from you again.

Best regards,
Julie




Bob Phillips[_6_]

How to protect option button?
 
Julie,

One way, assuming that you have another option button that counters the
effect is to add a macro to the buttons,, something like

Sub OBLinks()
Dim sLink As String
Dim oButton As Object

sLink = ActiveSheet.OptionButtons(Application.Caller).Link edCell
With ActiveSheet
Set oButton = .OptionButtons(Range(sLink).Value)
If .ProtectContents Then
oButton.Value = True
End If

End With

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Julie" wrote in message
...
Hi Tom,

Thank you for your response. I have try it. The link cell will not change
value and message will said the cell you are trying to change is

protected.

This will not change link cell value, but however, the option button will
change.
Now the option button and the link cell are not in line. This will create
problem for me to know which is the right result.

Do you have any clue how to solve this?

Hope to hear from you again.

Best regards,
Julie





All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com