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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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