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

تطبيق كود حمايه لجميع الصفحات


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

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    ActiveSheet.Unprotect
    '==================
  For Each cel In Target.Cells
    Application.EnableEvents = False
                  If cel.HasFormula Then
                                cel.Locked = True
                                cel.FormulaHidden = True
                                         With ActiveSheet
                                           .Protect
                                           .EnableSelection = xllockedCells
                                        End With
                               GoTo 1:
                   Else
                       ActiveSheet.Unprotect
                   End If
      Next
1:
     Application.EnableEvents = True
     
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