kiranmalepat
New Member
- Joined
- Aug 5, 2014
- Messages
- 25
I have used below code in excel sheet, it is working fine. But only one problem is ctrl z is not working in that excel sheet. Please advice
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 8 To 125
CTotal = Application.WorksheetFunction.Sum(Columns(i))
If CTotal = 0 Then
Cells(1, i).EntireColumn.Hidden = True
Else
Cells(1, i).EntireColumn.Hidden = False
End If
Next i
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 8 To 125
CTotal = Application.WorksheetFunction.Sum(Columns(i))
If CTotal = 0 Then
Cells(1, i).EntireColumn.Hidden = True
Else
Cells(1, i).EntireColumn.Hidden = False
End If
Next i
End Sub