![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Singapore
Posts: 77
|
I want to protect my workbook so that when user delete the workbook, a message will prompt to the user and warn him on the deletion. How can i do this ? Thx
Regards Andrew XJ |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Singapore
Posts: 77
|
If can't protect it with a open workbook, can i change some windows setting to protect it? I am using Windows 2000 Pro.
regards Andrew XJ |
|
|
|
|
|
#3 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
Andy, through vba the setattr makes the windows property of the workbook read-only. Makes it hard to overwrite in Excel.
Code:
Sub RdOnly() SetAttr activeworkbook.fullname, vbReadOnly End Sub Hope this helps. _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-03-18 19:00 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|