ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

隐ÂæC

隐ÂæC

Private Sub CommandButton1_Click()
If CommandButton1.Caption = "«ìÎ`" Then
        Cells.Columns.Hidden = False
        CommandButton1.Caption = "隐ÂÃ"
    Else
        CommandButton1.Caption = "«ìÎ`"
        col = ActiveSheet.UsedRange.Columns.Count
        rowss = ActiveSheet.UsedRange.Rows.Count
        For i = 2 To col
            If Application.WorksheetFunction.CountA(Range(Cells(4, i), Cells(rowss, i))) = 0 Then Columns(i).Hidden = True
        Next i
    End If
End Sub
学习

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD