If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Protect selected settings in 'options'
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? -- John |
#2
|
|||
|
|||
Protect selected settings in 'options'
John wrote...
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. |
#3
|
|||
|
|||
Protect selected settings in 'options'
Thanks for your time and explanation.
-- John "Harlan Grove" wrote: John wrote... 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. |
#4
|
|||
|
|||
Protect selected settings in 'options'
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. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "John" wrote: 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? -- John |
#5
|
|||
|
|||
Protect selected settings in 'options'
Shane Devenshire wrote...
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? |
Thread Tools | |
Display Modes | |
|
|