0

I'm Building a scheduler in excel, but I only want to allow the users to make edits using command buttons appose to editing directly on the sheet.

Effectively I need a barrier between the cells and the buttons to force users into filling out user forms.

I've tried the built in sheet/workbook protection function in the review ribbon yet this restricts making edits from VBA.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Dan
  • 11
  • 5
  • 2
    **Option1** Unprotect via VBA, Write to cell, Reprotect **Option2** Use `UserInterfaceOnly:=True`. Read about it in MSDN – Siddharth Rout Mar 29 '19 at 11:02
  • You can unprotect sheet, make changes by macro and protect it back. – Sergey Mar 29 '19 at 11:02
  • If you use `UserInterfaceOnly:=True` make sure you use it in the `Workbook_Open` event. It get's lost after a workbook is closed and opened again: See [VBA Excel: Sheet protection: UserInterFaceOnly gone](https://stackoverflow.com/questions/38353751/vba-excel-sheet-protection-userinterfaceonly-gone) – Pᴇʜ Mar 29 '19 at 11:06

1 Answers1

0
Sub name()

ActiveSheet.Unprotect "password"

'code goes here'

ActiveSheet.Protect "password", True, True

End sub

Just change password to something else, or don't. Naturally this is a bad answer, as the password will be written in plaintext. But if you want them to only use buttons it might not be an issue

OscarL
  • 50
  • 8