title: excel initialize 'protect/unprotect sheet' with a userform
body: <p>I have made an Excel file in which operators from a manufacturing company can log malfunctions/failures or anything that stops production. The way an operator logs a malfunction, is by clicking on a button on one sheet, that opens a userform created with VBA in Excel. </p>
  
  <p>The operator fills in all the required fields through dropdown menus (operators' name, team, malfunction type, machine name, etc). When the operator is finished, he or she can press on the save button which will write all the data to another sheet in a standardized way, so it is ready to be used for data visualization.</p>
  
  <p><em>The problem</em></p>
  
  <p>Some operators do not use the userform to log a malfunction, but type directly into the data sheet, which contradicts the logging of malfunctions in a standardized way. Simply hiding the sheet, or putting a password on it is not an option, because operators must be able to see all the logged malfunctions by others as well. </p>
  
  <p><em>Possible solution</em></p>
  
  <p>I have been thinking and the only solution to solve this, is to make the data-sheet readonly. But the problem that occurs then, is that the userform isn't able to put the data into the sheet as well. So i think the best way to solve this, is to put a readonly on the sheet at all times, but when the userform opens, the sheet is unprotected (so it can save the data on the sheet), and when the userform is closed it will be readonly again. Feel free to ask if you need anything.</p>
  
  <p>Thanks in advance.</p>