G
Guest
Hello,
I have an Excel file with many pages. I need to hide all but about 3 pages
for my "users." Right now, many of my macros will not run when the pages are
hidden and/or protected. If that's the way Excel works, so be it. No
problem.
My question is in regards to a strategy to give the appearance I'm seeking,
but stay within the confines of Excel functionality.
What scripting would give me the following ability:
1. A user opens the file. An auto macro runs, locking cells and hiding
pages I want hidden, so only the pages I want him/her to see are visible. I
don't want the user to be able to get into the pages and accidentaly change
formulas, etc... I do not have a "confidential information" situation, just
for protection of the forumlas and macros and to keep the file "clean &
uncomplicated"-looking for the user.
2. When a button is clicked to start a macro, have the macro first do the
following:
a. ScreenUpdating = false
b. unhide sheets (in order for macros to run: just necessary sheets or all
sheets)
c. unlock any cells needed to run the macro (may not need this if sheets
can be re-hidden before macro finishes)
d. perform macro's function
e. lock cells back
f. hide sheets
g. ScreenUpdating = True
h. Exit Sub
I don't know if this is a legitimate way to achieve my program design goal.
If there is another tact I need to take, please let me know.
Thank you,
Randy
I have an Excel file with many pages. I need to hide all but about 3 pages
for my "users." Right now, many of my macros will not run when the pages are
hidden and/or protected. If that's the way Excel works, so be it. No
problem.
My question is in regards to a strategy to give the appearance I'm seeking,
but stay within the confines of Excel functionality.
What scripting would give me the following ability:
1. A user opens the file. An auto macro runs, locking cells and hiding
pages I want hidden, so only the pages I want him/her to see are visible. I
don't want the user to be able to get into the pages and accidentaly change
formulas, etc... I do not have a "confidential information" situation, just
for protection of the forumlas and macros and to keep the file "clean &
uncomplicated"-looking for the user.
2. When a button is clicked to start a macro, have the macro first do the
following:
a. ScreenUpdating = false
b. unhide sheets (in order for macros to run: just necessary sheets or all
sheets)
c. unlock any cells needed to run the macro (may not need this if sheets
can be re-hidden before macro finishes)
d. perform macro's function
e. lock cells back
f. hide sheets
g. ScreenUpdating = True
h. Exit Sub
I don't know if this is a legitimate way to achieve my program design goal.
If there is another tact I need to take, please let me know.
Thank you,
Randy