Insert data with VBA command button into password protected sheet

csababenyi

New Member
Joined
Nov 17, 2020
Messages
15
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
  2. Web
Hi Guys, I have an excel speradsheet with 22 coulunms and about 1000 rows and growing with lots of macros in it.
There is an ADD command button on the main sheet that opens up a VBA scripted table that have drop downs to select data to add to the next row with another ADD DATA button in it. This will not close the VBA table have to X out the window and back to the sheet. when done adding data.
Have 8 users working on this document. I need to stop the users manual input in the sheet except with the ADD button and dropdowns. Everything works well so far.
Password protected the sheet and ADD button opens up the VBA table but the Add Data inside casuses an Run-time error '1004' most likely due to the password protection. I'd also like the second ADD DATA button close the table and back to the sheet.
Debug highlights this
code sh.Range("B" & Last_Row + 1).Value = Me.TextBox12
Hopefully the description undestandable, any insight or help would be greatly appriciated.
Thank you.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top