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

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

قام بنشر

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

Private Sub Worksheet_Change(ByVal Target As Range)

On Error Resume Next

If Me.[T1] Then Exit Sub

If Not Application.Intersect(Target, Range("k5:n100,C1:U1,p5:p100,aa5:aa100,ah2,ak2")) Is Nothing Then

Application.EnableEvents = False

Application.Undo

Application.EnableEvents = True

MsgBox "ÇáÑÕíÏ ãÍãí "

End If

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error Resume Next

Dim Rng As Range

Static cell As Range

Static TheFormula As String

Set Rng = Range("k5:n100,C1:U1,p5:p100,aa5:aa100,ah2,ak2")

If Not Application.Intersect(Target, Rng) Is Nothing Then

If Not cell Is Nothing Then

cell.Formula = TheFormula

End If

Set cell = ActiveCell

With cell

TheFormula = .Formula

.Value = .Value

End With

Else

With cell

.Formula = TheFormula

End With

End If

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