ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Protect Worksheets (https://www.excelbanter.com/excel-programming/354715-protect-worksheets.html)

astrikor[_3_]

Protect Worksheets
 

I find that by hiding a worksheet to protect it, any macro operation on
the worksheet is also inhibited.
Does anyone know of a way to allow macros to operate on a worksheet
while requiring a password from anyone else?


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


davesexcel[_22_]

Protect Worksheets
 

*You can unhide the sheets in the macro, and then hide them again, when
the action is completed, you can also protect your sheets by going to
tools,protection, protect sheets, ensure that the cells that need
changing have been unlock before you protect the sheet, *


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=517763


funkymonkUK[_98_]

Protect Worksheets
 

astrikor Wrote:
I find that by hiding a worksheet to protect it, any macro operation on
the worksheet is also inhibited.
Does anyone know of a way to allow macros to operate on a worksheet
while requiring a password from anyone else?


Let me see if I understand you question.

You have a sheet lets say full of data and you dont want anybody to see
it or mess with it. the sheet has macros?

are these standarded recorded macros if not are they attached to the
specific sheet that you want hidden?

I have something similar except I have a password which will run the
macro based on a password. the macro then unhides and unprotects does
its thing then protects and hides.

is this what you looking for?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=517763


astrikor[_4_]

Protect Worksheets
 

Thanks funkymonkUK - that it exactly - and your solution works great.
I now have the whole thing password protected, (macros and worksheets)
from interference, with the automacro unhiding and hiding the
worksheets as part of its runtime code.

Many thanks. Astrikor


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


funkymonkUK[_99_]

Protect Worksheets
 

glad to be of servic

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=51776


astrikor[_5_]

Protect Worksheets
 

astrikor Wrote:
Thanks funkymonkUK - that it exactly - and your solution works great.
I now have the whole thing password protected, (macros and worksheets)
from interference, with the automacro unhiding and hiding the
worksheets as part of its runtime code.

Many thanks. Astrikor


Sorry guys,

It all falls apart when I hit "Esc" while the macro is running - the
macro stops revealing the "hidden" worksheets. This is surprising
because it overrides a previous Application.ScreenUpdating = False
command which normally holds the starting worksheet sheet on the
screen.

It looks as if i need a command to request a password so that when any
keyboard key is pressed while the macro is running NOTHING can change
until password enabled.

Any ideas?
Thanks
Astrikor


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


funkymonkUK[_100_]

Protect Worksheets
 

how long does you macro run that you got time to press "esc"?


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=517763


astrikor[_6_]

Protect Worksheets
 

It takes 12 seconds.

Why so long? OK. The macro takes one of a sequence of data strings from
one sheet, pastes it to a second sheet where the string is processed by
predictive algorithms and cell formulae, the results of which are
logged into a third sheet. The macro then returns to the first sheet to
collect the next data string.There are hundreds of data strings, each
containing hundreds of data points.

While all this is happening, I don't want it to be interrupted by
external inputs, nor do I want anything changed (either deliberately or
by mistake).

On the other hand, as I may need to edit something, I don't want to
lock myself out (which happens if I use "Application.Interactive =
False/True" and hit "Esc" during macro operation).

Both the Sheet Hide and the Sheet Protect methods have to be unhided
and unprotected for the macro to be allowed to modify the sheets.
Perhaps what I need is a means of requiring a password when any key is
pressed during macro operation, but which allows the macro to continue
unless the password is correct.

Am I asking too much??

Astrikor


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


funkymonkUK[_102_]

Protect Worksheets
 

i think you might be asking to much. could you post your code and se
what we can do for you

--
funkymonkU
-----------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...fo&userid=1813
View this thread: http://www.excelforum.com/showthread.php?threadid=51776


astrikor[_7_]

Protect Worksheets
 

Its an idea, not sure how that would help, but I am prevented by
confidentiallity unfortunately.


--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


Dave Peterson

Protect Worksheets
 
Take a look at application.EnableCancelKey in VBA's help.

astrikor wrote:

astrikor Wrote:
Thanks funkymonkUK - that it exactly - and your solution works great.
I now have the whole thing password protected, (macros and worksheets)
from interference, with the automacro unhiding and hiding the
worksheets as part of its runtime code.

Many thanks. Astrikor


Sorry guys,

It all falls apart when I hit "Esc" while the macro is running - the
macro stops revealing the "hidden" worksheets. This is surprising
because it overrides a previous Application.ScreenUpdating = False
command which normally holds the starting worksheet sheet on the
screen.

It looks as if i need a command to request a password so that when any
keyboard key is pressed while the macro is running NOTHING can change
until password enabled.

Any ideas?
Thanks
Astrikor

--
astrikor
------------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...o&userid=31465
View this thread: http://www.excelforum.com/showthread...hreadid=517763


--

Dave Peterson

astrikor[_8_]

Protect Worksheets
 

Many thanks Dave,
That's the way to do it.
All working fine now.
Astriko

--
astriko
-----------------------------------------------------------------------
astrikor's Profile: http://www.excelforum.com/member.php...fo&userid=3146
View this thread: http://www.excelforum.com/showthread.php?threadid=51776



All times are GMT +1. The time now is 03:56 AM.

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