ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Keeping Prying eyes out (https://www.excelbanter.com/excel-programming/332902-keeping-prying-eyes-out.html)

Keith[_11_]

Keeping Prying eyes out
 
Hi,

I have a spreadsheet that, when opened it checks who the user is then
hides specific rows based on the user. Unfortunately I have two problems

1. If they Select Disable Macros then they can see the whole
spreadsheet. How can I make it so that if they disable then the
spreadsheet just closes?

2. Once the routine has run and the rows are all hidden how do I stop
users just dragging the rows back out, or selecting an group then
selecting unhide?

Any help would be greatly appreciated.

Thanks

Keith

Bob Phillips[_7_]

Keeping Prying eyes out
 
1. The standard approach is to have a separate sheet that has a message on
it saying that macros need to be enabled. Hide all sheets except this one,
and create a workbook_open piece of code that does your biz and hides this
warning sheet. If they disable macros, all they will see is the warning.

2.You could disable the menu items.

application.CommandBars("Worksheet Menu
Bar").Controls("Format").controls("Row").Controls( "Unhide").enabled=false


--
HTH

Bob Phillips

"Keith" wrote in message
...
Hi,

I have a spreadsheet that, when opened it checks who the user is then
hides specific rows based on the user. Unfortunately I have two problems

1. If they Select Disable Macros then they can see the whole
spreadsheet. How can I make it so that if they disable then the
spreadsheet just closes?

2. Once the routine has run and the rows are all hidden how do I stop
users just dragging the rows back out, or selecting an group then
selecting unhide?

Any help would be greatly appreciated.

Thanks

Keith




Gary Keramidas[_2_]

Keeping Prying eyes out
 
or, if you have the files on a server, you can use a gpo to disable items. i
disable macros and protection this way for certain users and let managers
see these options so they can run the macros.

--


Gary


"Keith" wrote in message
...
Hi,

I have a spreadsheet that, when opened it checks who the user is then
hides specific rows based on the user. Unfortunately I have two problems

1. If they Select Disable Macros then they can see the whole spreadsheet.
How can I make it so that if they disable then the spreadsheet just
closes?

2. Once the routine has run and the rows are all hidden how do I stop
users just dragging the rows back out, or selecting an group then
selecting unhide?

Any help would be greatly appreciated.

Thanks

Keith




Keith[_11_]

Keeping Prying eyes out
 
Keith wrote:
Hi,

I have a spreadsheet that, when opened it checks who the user is then
hides specific rows based on the user. Unfortunately I have two problems

1. If they Select Disable Macros then they can see the whole
spreadsheet. How can I make it so that if they disable then the
spreadsheet just closes?

2. Once the routine has run and the rows are all hidden how do I stop
users just dragging the rows back out, or selecting an group then
selecting unhide?

Any help would be greatly appreciated.

Thanks

Keith


The method posted by Bob works fine for the first part, but the second
part doesn't work. after Controls("Format"). It doesn't like Controls
again.

Dave Peterson[_5_]

Keeping Prying eyes out
 
If this data is really sensitive, then don't put it into your excel file.

Worksheet protection is easily broken.

Keith wrote:

Hi,

I have a spreadsheet that, when opened it checks who the user is then
hides specific rows based on the user. Unfortunately I have two problems

1. If they Select Disable Macros then they can see the whole
spreadsheet. How can I make it so that if they disable then the
spreadsheet just closes?

2. Once the routine has run and the rows are all hidden how do I stop
users just dragging the rows back out, or selecting an group then
selecting unhide?

Any help would be greatly appreciated.

Thanks

Keith


--

Dave Peterson

Bob Phillips[_7_]

Keeping Prying eyes out
 

"Keith" wrote in message
...
Keith wrote:

The method posted by Bob works fine for the first part, but the second
part doesn't work. after Controls("Format"). It doesn't like Controls
again.


It worked fine for me Keith ?


Bob




All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com