![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Help. Exel. Как сделать WorkBook в Read-Only или запаролить?
Andrey-k © (2003-02-02 22:45:00)Юзер после сздания Книги не должен иметь возможность ее редактировать. Создаю книгу примерно так :
Var
IWorkbook :Excel8TLB.Workbook;
FIXLSApp: Excel8TLB._Application
begin
IWorkbook := FIXLSApp.Workbooks.Add(EmptyParam, 0);
Andrey-k (2003-02-04 21:57:00) [1]Больше спасибо, будешь в РФ пиво поставлю.
asmith (2003-02-03 12:37:00) [2]У объекта Workbook есть метод Protect, предназначенный для таких целей.
Кусочек из справки по Exel-VBA
-----------
Protects a workbook so that it cannot be modified.
expression.Protect(Password, Structure, Windows)
expressionRequired. An expression that returns a Workbook object.
PasswordOptional Variant. A string that specifies a case-sensitive password for the worksheet or workbook. If this argument is omitted, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook. If you forget the password, you cannot unprotect the worksheet or workbook. It"s a good idea to keep a list of your passwords and their corresponding document names in a safe place.
StructureOptional Variant. True to protect the structure of the workbook (the relative position of the sheets). The default value is False.
WindowsOptional Variant. True to protect the workbook windows. If this argument is omitted, the windows aren’t protected.