Hi guys

I managed to create the below code in order to hide empty columns

Sub Auto_Open
Set r = ActiveSheet.UsedRange
nLastColumn = r.Columns.Count + r.Column - 1
nFirstcolumn = r.column
For n = nFirstcolumn To nLastcolumn
If Application.WorksheetFunction.CountA(columns(n)) = 0 Then
columns(n).Entirecolumn.Hidden = True
End If
Next
End Sub


as you see i named Auto_open so it starts at the opening, but i set it for active sheet
My workbook contains 7 sheets and i would like this macro to run at the beginning for sheets 2 kai 5. (i have renamed these sheets )

Any help??