VBA sheet protection

Lord_B

New Member
Joined
Oct 17, 2018
Messages
19
Hi All, thanks in advance for looking,

This might have been answered before but if it has I haven't found it.

I think i might be asking the impossible but here goes.

I would like to try and protect my workbook as much as possible from the zip extension hack.

I have a workbook with around a dozen worksheets with locked/unlocked cells and the sheets are password protected.

Now, if the password is striped out by the above mentioned is there a way to have the password re-activate once the workbook is opened?

Or is there a way to hard code a password to all sheets that cant be removed?

Again, I think this might be impossible or I might have to buy some software but any pointers/solutions will be greatly received.

Thanks for looking,

Ben
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi,

You can protect the worbook and the sheets on
Code:
Private Sub Workbook_Open()


End Sub
(2x click ThisWorkbook in VBA).

Issue is that those passwords are really easy to remove (I spent like 10 min on google).

My issue is I can really overprotect a workbook (no menu, no arrows, no sheet or even Hide Excel) with VBA
Code:
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Sub MaxScreen()[/TD]
[/TR]
[TR]
[TD]'Hide sheet tabs[/TD]
[/TR]
[TR]
[TD]ActiveWindow.DisplayWorkbookTabs = False[/TD]
[/TR]
[TR]
[TD]'Hide status bar[/TD]
[/TR]
[TR]
[TD]Application.DisplayStatusBar = False[/TD]
[/TR]
[TR]
[TD]'Hide scroll bars[/TD]
[/TR]
[TR]
[TD]With ActiveWindow[/TD]
[/TR]
[TR]
[TD]   .DisplayHorizontalScrollBar = False[/TD]
[/TR]
[TR]
[TD]   .DisplayVerticalScrollBar = False[/TD]
[/TR]
[TR]
[TD]End With[/TD]
[/TR]
[TR]
[TD]'Hide formula[/TD]
[/TR]
[TR]
[TD]Application.DisplayFormulaBar = False[/TD]
[/TR]
[TR]
[TD]'Minimizee ribbon[/TD]
[/TR]
[TR]
[TD]If  CommandBars("Ribbon").Controls(1).Height < 100 = 0 Then  CommandBars.ExecuteMso "MinimizeRibbon"[/TD]
[/TR]
[TR]
[TD]Possible to block scroll area  in properties of the sheet is a good way to protect as well[/TD]
[/TR]
[TR]
[TD="class: xl63"][/TD]
[/TR]
[TR]
[TD]End Sub[/TD]
[/TR]
</tbody>[/TABLE]

but te security allow users to open files without launching the macro's.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,546
Members
449,038
Latest member
Guest1337

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