Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Основная";
Текущий архив: 2003.02.13;
Скачать: [xml.tar.bz2];

Вниз

Help. Exel. Как сделать WorkBook в Read-Only или запаролить?   Найти похожие ветки 

 
Andrey-k   (2003-02-02 22:45) [0]

Юзер после сздания Книги не должен иметь возможность ее редактировать. Создаю книгу примерно так :

Var
IWorkbook :Excel8TLB.Workbook;
FIXLSApp: Excel8TLB._Application
begin
IWorkbook := FIXLSApp.Workbooks.Add(EmptyParam, 0);


 
asmith   (2003-02-03 12:37) [1]

У объекта Workbook есть метод Protect, предназначенный для таких целей.
Кусочек из справки по Exel-VBA
-----------
Protects a workbook so that it cannot be modified.
expression.Protect(Password, Structure, Windows)
expression Required. An expression that returns a Workbook object.
Password Optional 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.
Structure Optional Variant. True to protect the structure of the workbook (the relative position of the sheets). The default value is False.
Windows Optional Variant. True to protect the workbook windows. If this argument is omitted, the windows aren’t protected.


 
Andrey-k   (2003-02-04 21:57) [2]

Больше спасибо, будешь в РФ пиво поставлю.



Страницы: 1 вся ветка

Форум: "Основная";
Текущий архив: 2003.02.13;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.023 c
7-38580
Youri
2002-12-09 10:46
2003.02.13
Как работать с уровнями сигнала в телефоне?!


1-38163
Y
2003-02-04 10:26
2003.02.13
На время запретиь пользователю делать что-либо


1-38252
vlv
2003-02-05 14:49
2003.02.13
Как называется переменная?


3-38084
SerjUfa
2003-01-27 14:45
2003.02.13
2 вопроса по TQuery


1-38242
Сергей
2003-02-05 10:33
2003.02.13
ошибка в ActionMainMenuBar при работе с MDIChild окнами





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский