Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prevent Save in Excel 2000

Hi,

I'm trying to create a worksheet in Excel 2000 to post on an intranet site,
but I don't want users to be able to save copies to their local drives
because we will update reference data periodically.

I tried an auto run macro to disable the menu bar, but I also need it to run
automatically when the worksheet is closed to restore the users defaults (I
don't want any permanent changes to their Excel).

I also tried creating a web site, but I lost too much of the functionality
of the worksheet, so this won't work.

I'd appreciate any help.

Thanks,

Brian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Prevent Save in Excel 2000

Hi Brian

I have info on this page
http://www.rondebruin.com/menuid.htm

Use this two events in the Thisworkbook module.
Read more about events on Chip Pearson's site.

http://www.cpearson.com/excel/events.htm

Private Sub Workbook_Activate()
'your code to change Enabled to False
'Or the name of your macro
End Sub

Private Sub Workbook_Deactivate()
'your code to change Enabled to True
'Or the name of your macro
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian C" <Brian wrote in message ...
Hi,

I'm trying to create a worksheet in Excel 2000 to post on an intranet site,
but I don't want users to be able to save copies to their local drives
because we will update reference data periodically.

I tried an auto run macro to disable the menu bar, but I also need it to run
automatically when the worksheet is closed to restore the users defaults (I
don't want any permanent changes to their Excel).

I also tried creating a web site, but I lost too much of the functionality
of the worksheet, so this won't work.

I'd appreciate any help.

Thanks,

Brian



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Prevent Save in Excel 2000

Hi Ron,

This was great. I was able to disable the Save and Save As when I open
workbook, and re-enable when I close.

Now I have another challenge. If the user has their security setting at
Medium, they could open the workbook without enabling the macros. Is there a
way around this?

Thank you very much!

Brian

"Ron de Bruin" wrote:

Hi Brian

I have info on this page
http://www.rondebruin.com/menuid.htm

Use this two events in the Thisworkbook module.
Read more about events on Chip Pearson's site.

http://www.cpearson.com/excel/events.htm

Private Sub Workbook_Activate()
'your code to change Enabled to False
'Or the name of your macro
End Sub

Private Sub Workbook_Deactivate()
'your code to change Enabled to True
'Or the name of your macro
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian C" <Brian wrote in message ...
Hi,

I'm trying to create a worksheet in Excel 2000 to post on an intranet site,
but I don't want users to be able to save copies to their local drives
because we will update reference data periodically.

I tried an auto run macro to disable the menu bar, but I also need it to run
automatically when the worksheet is closed to restore the users defaults (I
don't want any permanent changes to their Excel).

I also tried creating a web site, but I lost too much of the functionality
of the worksheet, so this won't work.

I'd appreciate any help.

Thanks,

Brian




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Prevent Save in Excel 2000

Hi Brian

There is no safe way

One way is to hide all sheets except one and unhide them in
the workbook open event.
Place a message on that sheet with "you must enabled macro's to work with this file"
And hide the sheets in the beforeclose event.
So the user can't use the workbook if he disable macro's.
If he do the workbook open event don't run so there are no sheets
to work with
You must protect your project also in the VBA editor because a user can't unhide
the sheets there also if you don't do that.

Some example code to do this
Sheet 1 stay always visible

Sub HidealmostAll()
Dim a As Integer
For a = 2 To Sheets.Count
Sheets(a).Visible = xlVeryHidden
Next a
End Sub

Sub ShowAll()
Dim a As Integer
For a = 2 To Sheets.Count
Sheets(a).Visible = True
Next a
End Sub

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian C" wrote in message ...
Hi Ron,

This was great. I was able to disable the Save and Save As when I open
workbook, and re-enable when I close.

Now I have another challenge. If the user has their security setting at
Medium, they could open the workbook without enabling the macros. Is there a
way around this?

Thank you very much!

Brian

"Ron de Bruin" wrote:

Hi Brian

I have info on this page
http://www.rondebruin.com/menuid.htm

Use this two events in the Thisworkbook module.
Read more about events on Chip Pearson's site.

http://www.cpearson.com/excel/events.htm

Private Sub Workbook_Activate()
'your code to change Enabled to False
'Or the name of your macro
End Sub

Private Sub Workbook_Deactivate()
'your code to change Enabled to True
'Or the name of your macro
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian C" <Brian wrote in message ...
Hi,

I'm trying to create a worksheet in Excel 2000 to post on an intranet site,
but I don't want users to be able to save copies to their local drives
because we will update reference data periodically.

I tried an auto run macro to disable the menu bar, but I also need it to run
automatically when the worksheet is closed to restore the users defaults (I
don't want any permanent changes to their Excel).

I also tried creating a web site, but I lost too much of the functionality
of the worksheet, so this won't work.

I'd appreciate any help.

Thanks,

Brian






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
Prevent duplicate entries in Excel 2000 Stressed Excel Discussion (Misc queries) 11 January 28th 08 09:07 AM
Prevent users from adding rows in Excel 2000 ALEX Excel Discussion (Misc queries) 4 October 10th 06 05:18 PM
IN EXCEL 2000 HOW DO YOU PREVENT TEXT FROM GOING INTO THE NEXT COL Eddie Excel Discussion (Misc queries) 1 March 2nd 06 08:52 PM
How can I prevent Excel 2000 from inserting hyperlinks? RJL Jr. Setting up and Configuration of Excel 1 May 20th 05 12:15 PM
Excel 2000: Unprotected cells - how to prevent cursor from wrapping ??? Bertus Theron Excel Programming 0 June 22nd 04 11:05 PM


All times are GMT +1. The time now is 10:20 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"