اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

كيفية منع التعديل على الملفات


قيس111

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

عندي ملف اكسل عامل عليه كود او مايكرو يمنع التعديل على بياناته ولكن تفاجأت بأن بالضغط على مفتاح كنترول CTRL تستطيع التعديل على اي ملف اكسل بالعربي ( تستطيع ايقاف عمل اي مايكرو في اي ملف اكسل  ) فأرجو من الخبراء بمساعدتي لكي امنع التعديل على الملفات.

 

 

رابط هذا التعليق
شارك

السلام عليكم

طريقة أخرى لعمل ذلك هي باستعمال خاصية "أدوات Tools" في أمر "حفظ باسم... Save As" (يمكن حفظه بالاسم نفسه أو باسم آخر) بعد وضع كلمة سرية للتعديل مع اختيار خاصية "للقراءة فقط"... والله أعلى وأعلم

ملاحظة: باستعمال هذه الخاصية الملف لا يفتح للتعديل إلا بإدخال الكلمة السرية أو يمكن فتحه للقراءة فقط (أي لا يمكن التعديل عليه)... 

بن علية حاجي 

  • Like 1
  • Thanks 1
رابط هذا التعليق
شارك

تفضل هذا كود حماية المدخلات بمعنى يمكنك الإدخال مرة واحدة فى الخلايا ولا يمكن ولا يمكن التعديل على المدخلات الأولى

وهذا الكود يوضع فى حدث الورقة

Option Explicit
 Dim Old_value
 Dim New_value

 Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Old_value = Target.Cells(1, 1).Value
 End Sub
'==============================================
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo Final_Step
If Intersect(Target, Range("A1:XFD10000")) Is Nothing Then GoTo Final_Step
   New_value = Target.Value
    If Target.Cells.Count > 1 Then
      Application.Undo
     GoTo Final_Step
    End If
    If Old_value = "" And Target.Cells.Count > 1 Then
     Application.Undo
     GoTo Final_Step
    End If
     If Old_value = "" Then
      Target.Value = New_value
      Else
     Application.Undo
    End If
Final_Step:
 Application.EnableEvents = True
End Sub

وهذا كود اخر لحماية الخلايا بعد المدخلات مباشرة بكلمة سر ويوضع ايضا فى حدث الصفحة -وكلمة السر هى 123

Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As Range
On Error Resume Next
Set xRg = Intersect(Range("A1:XFD10000"), Target)
If xRg Is Nothing Then Exit Sub
Target.Worksheet.Unprotect Password:="123"
xRg.Locked = True
Target.Worksheet.Protect Password:="123"
End Sub

 

  • Like 1
رابط هذا التعليق
شارك

إذا كنت تبحث عن طريقة لمنع التخريب الغير مقصود ففي الطرق التي أفادك بها الأخوة الحل 

أما إن كنت تخشى من كسر الحماية من قبل مخترق

الأوفيس لا يصلح لمثل هذه الحماية ...( أياً كان هذا البرنامج أكسس - إكسل - ورد ..... ) 

رابط هذا التعليق
شارك

  • 2 weeks later...

أعتقد أنك ترغب بتعطيل الاختصارات التي تستخدم 

Ctrl

و حتى لو عطلت هذا المفتاح فإن الاختصار سيعمل ، عليك - في سبيل ذلك- عمل ماكرو لتعطيل الاختصار واحداً واحداً .

مثال  :

""  , "Application.onkey "^s

* لا أستطيع لصق الكود بالصورة المناسبة لأن الخيار الخاص بذلك لا يظهر حيث أستخدم الجوال .

رابط هذا التعليق
شارك

تفضل اخى الكريم -هذا الكود للتعطيل

Sub Disable_Keys()
    Dim StartKeyCombination As Variant
    Dim KeysArray As Variant
    Dim Key As Variant
    Dim I As Long
    On Error Resume Next
    'Shift key = "+"  (plus sign)
    'Ctrl key = "^"   (caret)
    'Alt key = "%"    (percent sign
    'We fill the array with this keys and the key combinations
    'Shift-Ctrl, Shift- Alt, Ctrl-Alt, Shift-Ctrl-Alt
    For Each StartKeyCombination In Array("+", "^", "%", "+^", "+%", "^%", "+^%")
        KeysArray = Array("{BS}", "{BREAK}", "{CAPSLOCK}", "{CLEAR}", "{DEL}", _
                    "{DOWN}", "{END}", "{ENTER}", "~", "{ESC}", "{HELP}", "{HOME}", _
                    "{INSERT}", "{LEFT}", "{NUMLOCK}", "{PGDN}", "{PGUP}", _
                    "{RETURN}", "{RIGHT}", "{SCROLLLOCK}", "{TAB}", "{UP}")
        'Disable the StartKeyCombination key(s) with every key in the KeysArray
        For Each Key In KeysArray
            Application.OnKey StartKeyCombination & Key, ""
        Next Key
        'Disable the StartKeyCombination key(s) with every other key
        For I = 0 To 255
            Application.OnKey StartKeyCombination & Chr$(I), ""
        Next I
        'Disable the F1 - F15 keys in combination with the Shift, Ctrl or Alt key
        For I = 1 To 15
            Application.OnKey StartKeyCombination & "{F" & I & "}", ""
        Next I
    Next StartKeyCombination
    'Disable the F1 - F15 keys
    For I = 1 To 15
        Application.OnKey "{F" & I & "}", ""
    Next I
    'Disable the PGDN and PGUP keys
    Application.OnKey "{PGDN}", ""
    Application.OnKey "{PGUP}", ""
End Sub

وهذا لإرجاع الحال الى السابق والطبيعى اى لعمل الإختصارات مرة أخرى

Sub Enable_Keys()
    Dim StartKeyCombination As Variant
    Dim KeysArray As Variant
    Dim Key As Variant
    Dim I As Long
    On Error Resume Next
    'Shift key = "+"  (plus sign)
    'Ctrl key = "^"   (caret)
    'Alt key = "%"    (percent sign
    'We fill the array with this keys and the key combinations
    'Shift-Ctrl, Shift- Alt, Ctrl-Alt, Shift-Ctrl-Alt
    For Each StartKeyCombination In Array("+", "^", "%", "+^", "+%", "^%", "+^%")
        KeysArray = Array("{BS}", "{BREAK}", "{CAPSLOCK}", "{CLEAR}", "{DEL}", _
                    "{DOWN}", "{END}", "{ENTER}", "~", "{ESC}", "{HELP}", "{HOME}", _
                    "{INSERT}", "{LEFT}", "{NUMLOCK}", "{PGDN}", "{PGUP}", _
                    "{RETURN}", "{RIGHT}", "{SCROLLLOCK}", "{TAB}", "{UP}")
        'Enable the StartKeyCombination key(s) with every key in the KeysArray
        For Each Key In KeysArray
            Application.OnKey StartKeyCombination & Key
        Next Key
        'Enable the StartKeyCombination key(s) with every other key
        For I = 0 To 255
            Application.OnKey StartKeyCombination & Chr$(I)
        Next I
        'Enable the F1 - F15 keys in combination with the Shift, Ctrl or Alt key
        For I = 1 To 15
            Application.OnKey StartKeyCombination & "{F" & I & "}"
        Next I
    Next StartKeyCombination
    'Enable the F1 - F15 keys
    For I = 1 To 15
        Application.OnKey "{F" & I & "}"
    Next I
    'Enable the PGDN and PGUP keys
    Application.OnKey "{PGDN}"
    Application.OnKey "{PGUP}"
End Sub
 

أتمنى الإفادة بارك الله فيك 

  • Like 1
رابط هذا التعليق
شارك

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