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

تعديل كود حذف صنف


إذهب إلى أفضل إجابة Solved by الرائد77,

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

  • أفضل إجابة

تفضل أخي

الكود يعمل بسرعة جيدة في حالة وجود بيانات أكثر . يعمل جيدا

Private Sub CommandButton3_Click()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False
Application.EnableEvents = False

If MsgBox("سيتم الحذف هل أنت متأكد؟", vbQuestion + vbYesNo) = vbYes Then
           
     
         Sheets("الأصناف").Cells(r, 1).EntireRow.delete
            
     MsgBox "تمت عملية الحذف بنجاح"
    For Y = 1 To 7
               Controls("textbox" & Y).Value = ""
                On Error Resume Next
    Next Y
    ListBox1.Clear
    UserForm_Activate
    
Else
Exit Sub
End If

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayStatusBar = True
Application.EnableEvents = True

End Sub

 

 

حذف صنف.xlsm

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

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