by

Command Show Hide Cell di Macro Excel

Berikut ini adalah command atau perintah yang dapat anda gunakan untuk menampilkan dan menyembunyikan cell baik kolom maupun baris menggunakan Microsoft Excel dengan Macro VBA Project.

Private Sub BtnShowHide_Click()

If Sheet1.Range("J2").Value = "Hide" Then
'Hide columns
Range("B:C").EntireColumn.Hidden = True
'Hide rows
Rows("14:16").EntireRow.Hidden = True
MsgBox "Cell hidden !", vbInformation, "==Information=="

ElseIf Sheet1.Range("J2").Value = "Show" Then
'Show columns
Range("B:C").EntireColumn.Hidden = False
MsgBox "Cell showed !", vbInformation, "==Information=="
'Show rows
Rows("14:16").EntireRow.Hidden = False

Else
MsgBox "Something Error, Check again :)", vbCritical, "==Info=="
End If

End Sub

Download Project:
[Klik Disini]

Comment

Leave a Reply

Your email address will not be published. Required fields are marked *