Hi all,
Wondering if someone could help? I have this code that inserts a new form directly below the last one. See attached. However the sheet is protected which doesn't allow macros to work. I found this code that allows the macro to work. The code unprotects the sheet, runs the macro and protects it again. The problem I've got is that it displays the password in the code which is not what I want. I tried protecting the VBA code to stop users from viewing but it doesn't allow users to save work.
So I found another bit of code which should allow me to run macros:
Sheets(“Sheet1”).Unprotect userinterfaceonly:=True
...which I've put at the top of the macro 'insertdata' (in attached), and it is still coming up with an error.
Has anyone got any ideas on what is wrong with the code.
Many thanks
Harry
Bookmarks