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

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

  • تمت الإجابة
قام بنشر

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

جرب هدا 

Option Explicit

Public Property Get WS() As Worksheet: Set WS = Sheets("الاختلافات"): End Property

Sub Button1_Click()
    Dim i As Long
    SetApp False
    For i = 3 To 62
        WS.Rows(i).Hidden = (Application.WorksheetFunction.CountA(WS.Range("B" & i & ":R" & i)) = 0)
    Next i
    SetApp True
End Sub

Sub Button49_Click(): SetApp False: WS.Rows("3:62").Hidden = False: SetApp True: End Sub

Private Sub SetApp(ByVal enable As Boolean)
    On Error Resume Next
    With Application
        .ScreenUpdating = enable: .EnableEvents = enable: .DisplayAlerts = enable
        .Calculation = IIf(enable, xlCalculationAutomatic, xlCalculationManual)
    End With
    On Error GoTo 0
End Sub

 

كود إخفاء وإظهار.xlsb

  • Thanks 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