I have an audit tool with a drop down selection of several service types. For two service types there are additional audit questions of varying sizes. I have been attempting to build script the provides for certain cells to be locked as they do not apply and for the two service types a range of cells to be locked when other service types are chosen.
For example "Community Nurse" and "Home Care Packages" have additional questions that do not apply to other services.
I have one script i found that helps on a new workbook:
Private Sub Worksheet_Change(ByVal Target As Range)
If [B3] = "Community Nurse" Then
[C40:C41].Locked = True
Else
[C40:C41].Locked = False
End If
End Sub
When I have use in my Workbook it does not work. I also cannot work through how to nest the If Statement to include "Home Care Packages."
Any guidance would be most appreciated.
Mel
ps I couldn't load the XL2bb system said the machine is in protect mode!
For example "Community Nurse" and "Home Care Packages" have additional questions that do not apply to other services.
I have one script i found that helps on a new workbook:
Private Sub Worksheet_Change(ByVal Target As Range)
If [B3] = "Community Nurse" Then
[C40:C41].Locked = True
Else
[C40:C41].Locked = False
End If
End Sub
When I have use in my Workbook it does not work. I also cannot work through how to nest the If Statement to include "Home Care Packages."
Any guidance would be most appreciated.
Mel
ps I couldn't load the XL2bb system said the machine is in protect mode!