I am trying to get the combobox data validation solution that was posted on http://www.contextures.com/xlDataVal10.html to work on a protected sheet.

I tried unprotecting the sheet and re-protected at the end of the sub, but since the user have to make a selection, the sheet is protected before the user can make a selection on the combobox. Does anyone have any idea how to let the vba run on protected sheet and have the combobox function as intended?

Here's the second part of the code that I tweaked (did not work):

Dim str As String
Dim cboTemp As OLEObject
Dim ws As Worksheet
Set ws = ActiveSheet
Set cboTemp = ws.OLEObjects("TempCombo")
On Error Resume Next
ws.Unprotect ("asdf")
If cboTemp.Visible = True Then
With cboTemp
.Top = 10
.Left = 10
.ListFillRange = ""
.LinkedCell = ""
.Visible = False
.Value = ""
End With
End If
ws.Protect ("asdf")
errHandler:
Application.EnableEvents = True
Exit Sub
End Sub


I'd appreciate any input, thanks.