اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

السلام عليكم ورحمة الله وبركاتة ,

اخواني الاعزاء قمت بالبحث عن مواضيع الدالة Protect ولكن لم اجد عضو تطرق الي توضيح معاملات هذة الدالة , فمثلا المعامل الاولي من هذة الدالة كان واضح جدا وهو password و ترجمة كلمة السر , لقد دخلت علي المساعد للاكسيل ولكن للاسف كانت كلها باللغة الانجليزية ,

لذا ارجو من الاخوان ولو تفسير وتوضيح معاني معاملات هذة الدالة حتي نستفيد منها , وشكرا لكم

قام بنشر

السلام عليكم ورحمة الله وبركاتة

Protect حسب ما اعرف ليست داله ومعناها حمايه ممكن من تنسيق الخلايا تجد حمايه وتستعمل لتامين الخليه او اخفائها

قام بنشر (معدل)
Protects a worksheet so that it cannot be modified.

expression.Protect(Password, DrawingObjects, Contents, Scenarios, UserInterfaceOnly, AllowFormattingCells, AllowFormattingColumns, AllowFormattingRows, AllowInsertingColumns, AllowInsertingRows, AllowInsertingHyperlinks, AllowDeletingColumns, AllowDeletingRows, AllowSorting, AllowFiltering, AllowUsingPivotTables)
expression    Required. An expression that returns a Worksheet 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.

DrawingObjects   Optional Variant. True to protect shapes. The default value is False.

Contents   Optional Variant. True to protect contents. For a chart, this protects the entire chart. For a worksheet, this protects the locked cells. The default value is True.

Scenarios   Optional Variant. True to protect scenarios. This argument is valid only for worksheets. The default value is True.

UserInterfaceOnly   Optional Variant. True to protect the user interface, but not macros. If this argument is omitted, protection applies both to macros and to the user interface.

AllowFormattingCells   Optional Variant. True allows the user to format any cell on a protected worksheet. The default value is False.

AllowFormattingColumns   Optional Variant. True allows the user to format any column on a protected worksheet. The default value is False.

AllowFormattingRows   Optional Variant. True allows the user to format any row on a protected. The default value is False.

AllowInsertingColumns   Optional Variant. True allows the user to insert columns on the protected worksheet. The default value is False.

AllowInsertingRows   Optional Variant. True allows the user to insert rows on the protected worksheet. The default value is False.

AllowInsertingHyperlinks   Optional Variant. True allows the user to insert hyperlinks on the worksheet. The default value is False.

AllowDeletingColumns   Optional Variant. True allows the user to delete columns on the protected worksheet, where every cell in the column to be deleted is unlocked. The default value is False.

AllowDeletingRows   Optional Variant. True allows the user to delete rows on the protected worksheet, where every cell in the row to be deleted is unlocked. The default value is False.

AllowSorting   Optional Variant. True allows the user to sort on the protected worksheet. Every cell in the sort range must be unlocked or unprotected. The default value is False.

AllowFiltering   Optional Variant. True allows the user to set filters on the protected worksheet. Users can change filter criteria but can not enable or disable an auto filter. Users can set filters on an existing auto filter. The default value is False.

AllowUsingPivotTables   Optional Variant. True allows the user to use pivot table reports on the protected worksheet. The default value is False.

Remarks
If you apply the Protect method with the UserInterfaceOnly argument set to True to a worksheet and then save the workbook, the entire worksheet (not just the interface) will be fully protected when you reopen the workbook. To re-enable the user interface protection after the workbook is opened, you must again apply the Protect method with UserInterfaceOnly set to True.

If changes wanted to be made to a protected worksheet, it is possible to use the Protect method on a protected worksheet if the password is supplied. Also, another method would be to unprotect the worksheet, make the necessary changes, and then protect the worksheet again.

Note  'Unprotected' means the cell may be locked (Format Cells dialog) but is included in a range defined in the Allow Users to Edit Ranges dialog, and the user has unprotected the range with a password or been validated via NT permissions.

Protect method as it applies to the Workbook object.

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.

تم تعديل بواسطه ابو اسامة العينبوسي
قام بنشر

المعاملات لها كثيره لكن ما اعرفه بالترتيب

1- رسم الاشكال - true ,false

2-المحتوى - حمايه المحتوى true ,false

3-تنسيق الخلايا true ,false

4-تنسيق الصفوف true ,false

5-تنسيق الاعمده true ,false

6-ادراج اعمده true ,false

7-ادراج صفوف true ,false

8-وضع ارتباط تشعبى true ,false

9-حذف الصفوف true ,false

10-حذف الاعمده true ,false

11-السماح بالفرز true ,false

12- السماح بالفلتره true ,false

13-السماح بادراج جدول محورى true ,false

Private Sub Workbook_Open()
Dim wSht As Worksheet
Dim PW As String

 PW = "password"
 'set protection using UserInterface to allow macros to work
  For Each wSht In ActiveWorkbook.Sheets
        wSht.Protect _
            Password:=PW, _
            DrawingObjects:=True, _
            Contents:=True, _
            Scenarios:=True, _
            UserInterfaceOnly:=True
    Next wSht
End Sub

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information