Quick hopefully simple question ... How do you turn on the "Read Only" feature in a workbook.
I have a data entry workbook that when the end user closes the userform (frmTracker) or when the userform deactivates I would like for the "Read-Only" feature to turn on on the "data" worksheet to prevent any modifications. But as long as the userform (frmTracker) is "Activated" I would like for the "Read-Only" to turn Off.
Is this possible without running into Run-time Errors? also I'm working with list objects (tables).
Below is the code for when the userform Initializes:
Private Sub UserForm_Initialize()
Set oSht = ThisWorkbook.Sheets("data")
.Width = 245
.comboMgr.List = oSht.Range("mgrList").Value
.comboSup.List = oSht.Range("supList").Value
.comboSpecialist.List = oSht.Range("repList").Value
.comboBehavior.List = oSht.Range("segmentList").Value
' shows today's date
.txtDate.Value = Format(Date, "short date")
'used a label to prevent any one changing entry
.lblCoach.Caption = "Hi, " & CurUser
Set oSht = ThisWorkbook.Sheets("Data")
Set oLo = oSht.ListObjects("CFSData")
Me.EnableEvents = True