F
Frick
I have the following macro code and would like to have it run automatically as information is
entered into the spreadsheet.
As it is now I have to select tools, macros and then the macro to run it.
Thanks,
Sub HideColumns()
Dim cell As Range
Application.ScreenUpdating = False
With ActiveSheet
For Each cell In .Range("D29:GA29")
If cell.Value = 0 Then cell.EntireColumn.Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub
Sub UnhideColumns()
Application.ScreenUpdating = False
Range("D29:GA29").Columns.Hidden = False
Application.ScreenUpdating = True
End Sub
entered into the spreadsheet.
As it is now I have to select tools, macros and then the macro to run it.
Thanks,
Sub HideColumns()
Dim cell As Range
Application.ScreenUpdating = False
With ActiveSheet
For Each cell In .Range("D29:GA29")
If cell.Value = 0 Then cell.EntireColumn.Hidden = True
Next
End With
Application.ScreenUpdating = True
End Sub
Sub UnhideColumns()
Application.ScreenUpdating = False
Range("D29:GA29").Columns.Hidden = False
Application.ScreenUpdating = True
End Sub