Help with auto macro

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
 
V

Vasant Nanavati

Hi:

What event would trigger the macro, especially the second one?

Regards,

Vasant.

Frick said:
I have the following macro code and would like to have it run
automatically as information is
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top