Protect selected settings in 'options'

J

John

In a particular workbook I have selected certain settings (tools, options,
view), namely not showing the sheet tabs, horizontal scroll bar, formula bar.
For this workbook is there a way I can protect these settings from others
changing them?
 
H

Harlan Grove

John said:
In a particular workbook I have selected certain settings (tools, options,
view), namely not showing the sheet tabs, horizontal scroll bar, formula bar.
For this workbook is there a way I can protect these settings from others
changing them?

No.

At least not loading the workbook in an interactive Excel session. You
could use an application written in any language supported by Visual
Studio (VS) to run an Excel session as an Automation server, then open
your workbook in that Excel Automation session. Your VS application
would need to disable all UI components you don't want to provide your
users.

You could approximate this with Excel itself, using an Open event
handler to disable all unwanted UI components, but your users could
open your workbook with macros disabled.
 
J

John

Thanks for your time and explanation.
--
John


Harlan Grove said:
No.

At least not loading the workbook in an interactive Excel session. You
could use an application written in any language supported by Visual
Studio (VS) to run an Excel session as an Automation server, then open
your workbook in that Excel Automation session. Your VS application
would need to disable all UI components you don't want to provide your
users.

You could approximate this with Excel itself, using an Open event
handler to disable all unwanted UI components, but your users could
open your workbook with macros disabled.
 
S

Shane Devenshire

Hi,

When you do hide these features you aren't preventing the user from using
the keyboard to navigate within a sheet and there are many ways to go from
sheet to sheet other than clicking the tabs. So what are you trying to
accomplish by hiding these features, since you aren't preventing the use of
equivalent command?

One minor thing you could do is set those option to the your desired state
everytime they open the workbook, so if they or anyone else has turned those
features back on you can start them off with them off.

Here is sample code

Private Sub Workbook_Open()
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
End Sub

Put this in the thisWorkbook object in the Visual Basic Editor.
 
H

Harlan Grove

Shane Devenshire said:
When you do hide these features you aren't preventing the user from using
the keyboard to navigate within a sheet and there are many ways to go from
sheet to sheet other than clicking the tabs. . . .
....

Could use OnKey method calls to map [Ctrl]+[PgUp] and [Ctrl]+[PgDn] to
do-nothing macros, which would effectively disable them. Same caveat
as I mentioned previously: requires macros to do this, so could be
disabled by opening the workbook with macros disabled. OTOH, opening
the workbook in an Excel Automation session driven by an outside
application could ensure that the necessary OnKey method calls were
run.

So if an outside application has disabled all cursor keys and the [F5]
key, hidden the worksheet tabs, and hidden the standard menu, how
could a user move between worksheets?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top