Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 109
Default prevent users from adding sheets / charts

All,

Searched for a while, but haven't found an answer to this one yet. I have a
workbook that I do not want the users to add worksheets or charts to. In
particular by a stray keystroke of F11 (like when I forget to hold alt and
hit it myself :-/ )

Is there a way to disable adding sheets / charts?

TIA,
Ian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default prevent users from adding sheets / charts

Ian;

Did you Google on "Disable F1 Key".
I know there is some stuff to find about that topic and your question might
probably be answered the same way.

Actually, here it is.

a.. Unhide your personal.xls file
a.. Tools-Macros-Visual Basic Editor
a.. Choose the "ThisWorkbook" file icon in the upper left hand box
a.. Add this VB code:

Private Sub Workbook_Open()
Application.OnKey "{F1}", ""
End Sub
a.. Save the file, and close.

Result: No more accidental MS help windows!

I did not test it, but I assume that it might help with F11 as well.

--
Regards;
Mark Rosenkrantz
--
Spreadsheet Solutions
Uithoorn
Netherlands (the country were they live some 18 feet beyond sea level)

E:
W:
www.spreadsheetsolutions.nl
--
"Ian" wrote in message
...
All,

Searched for a while, but haven't found an answer to this one yet. I have
a
workbook that I do not want the users to add worksheets or charts to. In
particular by a stray keystroke of F11 (like when I forget to hold alt and
hit it myself :-/ )

Is there a way to disable adding sheets / charts?

TIA,
Ian


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default prevent users from adding sheets / charts

On Dec 9, 6:44*am, "Spreadsheet Solutions"
wrote:
Ian;

Did you Google on "Disable F1 Key".
I know there is some stuff to find about that topic and your question might
probably be answered the same way.

Actually, here it is.

a.. Unhide your personal.xls file
a.. Tools-Macros-Visual Basic Editor
a.. Choose the "ThisWorkbook" file icon in the upper left hand box
a.. Add this VB code:

* Private Sub Workbook_Open()
* Application.OnKey "{F1}", ""
* End Sub
a.. Save the file, and close.

Result: No more accidental MS help windows!

I did not test it, but I assume that it might help with F11 as well.

--
Regards;
Mark Rosenkrantz
--
Spreadsheet Solutions
Uithoorn
Netherlands (the country were they live some 18 feet beyond sea level)

E:
W:www.spreadsheetsolutions.nl
*--"Ian" wrote in message

...



All,


Searched for a while, but haven't found an answer to this one yet. *I have
a
workbook that I do not want the users to add worksheets or charts to. *In
particular by a stray keystroke of F11 (like when I forget to hold alt and
hit it myself :-/ *)


Is there a way to disable adding sheets / charts?


TIA,
Ian- Hide quoted text -


- Show quoted text -


Wouldn't the simplest solution be to make the spreadsheet read-only so
no-one can make permanent changes?

Rob
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default prevent users from adding sheets / charts


Protecting the workbook (structure) prevents the addition of sheets.
--
Jim Cone
Portland, Oregon USA



"Ian"
wrote in message
All,
Searched for a while, but haven't found an answer to this one yet. I have a
workbook that I do not want the users to add worksheets or charts to. In
particular by a stray keystroke of F11 (like when I forget to hold alt and
hit it myself :-/ )
Is there a way to disable adding sheets / charts?
TIA,
Ian
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 109
Default prevent users from adding sheets / charts


Hi guys,

Thanks for the replies. Unfortunately, the book I'm making is a score sheet
that the users have to enter data into, however I do not want them to be able
to add worksheets via InsertWorksheet, nor do I want them to add a chart
sheet via InsertChart or simply the F11 key.

I cannot make the workbook read only as that defeats the purpose of the
score sheet.

Mark's solution of the onkey command takes care of part of the problem.
Anyone know how to prevent the rest?

Thanks,
Ian

"Jim Cone" wrote:

Protecting the workbook (structure) prevents the addition of sheets.
--
Jim Cone
Portland, Oregon USA






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default prevent users from adding sheets / charts

And what is the problem you have when you protect the workbook | structure?
--
Jim Cone
Portland, Oregon USA




"Ian"
wrote in message
Hi guys,
Thanks for the replies. Unfortunately, the book I'm making is a score sheet
that the users have to enter data into, however I do not want them to be able
to add worksheets via InsertWorksheet, nor do I want them to add a chart
sheet via InsertChart or simply the F11 key.
I cannot make the workbook read only as that defeats the purpose of the
score sheet.
Mark's solution of the onkey command takes care of part of the problem.
Anyone know how to prevent the rest?
Thanks,
Ian



"Jim Cone" wrote:
Protecting the workbook (structure) prevents the addition of sheets.
--
Jim Cone
Portland, Oregon USA


  #7   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 109
Default prevent users from adding sheets / charts

Nothing... just couldn't get the code to work... everything good now. Thanks
for pointing me in the right direction.

For those searching, code is:

Workbooks(Workbook_Name).Protect Password:=PW, Structu=True

and to unprotect
Workbooks(Workbook_Name).Unprotect Password:=PW


-Ian

"Jim Cone" wrote:

And what is the problem you have when you protect the workbook | structure?
--
Jim Cone
Portland, Oregon USA




"Ian"
wrote in message
Hi guys,
Thanks for the replies. Unfortunately, the book I'm making is a score sheet
that the users have to enter data into, however I do not want them to be able
to add worksheets via InsertWorksheet, nor do I want them to add a chart
sheet via InsertChart or simply the F11 key.
I cannot make the workbook read only as that defeats the purpose of the
score sheet.
Mark's solution of the onkey command takes care of part of the problem.
Anyone know how to prevent the rest?
Thanks,
Ian



"Jim Cone" wrote:
Protecting the workbook (structure) prevents the addition of sheets.
--
Jim Cone
Portland, Oregon USA



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
code to prevent users from adding new worksheets jat Excel Worksheet Functions 2 March 18th 09 08:24 PM
Adding new data to tables and charts in excel sheets from 97/2003 gill Excel Worksheet Functions 1 May 29th 08 05:42 PM
Prevent users from adding rows in Excel 2000 ALEX Excel Discussion (Misc queries) 4 October 10th 06 05:18 PM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM
Help - Automating a file.. Adding Users , Deleting users, Changing Tim Harding Excel Worksheet Functions 0 March 16th 05 01:25 PM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"