Private Sub CommandButton1_Click()
With Rows("8:15")
.EntireRow.Hidden = IIf(.EntireRow.Hidden, False, True)
Dim Msg As Boolean
End With
With CommandButton1
.Caption = IIf(Msg, "顯示", "隱藏")
.BackColor = IIf(Msg, vbRed, vbBlue)
.ForeColor = IIf(Msg, vbBlack, vbWhite)
End With
End Sub作者: GBKEE 時間: 2015-3-6 12:13