VB Protection and Adding Rows

tmo4ever

New Member
Joined
Nov 7, 2005
Messages
49
Okay, I'm happy to say this **** Spreadsheet is almost done! Thanks to everyone here for there much needed help!

Worksheet Overview -
I have several rows for users to enter data. This populated the matching columns (duh!). Some cells need to be protected, and I need to be able to use the Outline feature at the same time. For this I the following code on the Workbook:

Code:
Private Sub Workbook_Open()
With ActiveSheet
        .EnableOutlining = True
        .Protect "password", UserInterfaceOnly:=True
    End With
End Sub

I also have to make it possible for them to add additional worksheets of the same content - For this I use the following code on the the Sheet:

Code:
Private Sub Worksheet_Activate()
With Me
.EnableOutlining = True
.Protect "password", UserInterfaceOnly:=True
End With
End Sub

This has been working GREAT!

The problem is apparently when you protect a sheet by using VBA, there is no easy way to enable/disable certain features for the user.

I specifically need them to have the ability to:

Select a Row
Copy said Row
Insert copied Row

Any ideas?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
you can always setup Command Buttons to do this and keep it protected at the same time. With VB you can have a user select a protected cell that is locked that they would not usually be able to select.
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,192
Members
448,554
Latest member
Gleisner2

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