I have a spreadsheet that works great, followed along with some instructions, but every time I switch months I must run a macro to make it update the days.
Is there a way to change this?
Attached is the VBA code
Is there a way to change this?
Attached is the VBA code
VBA Code:
[TABLE]
[TR]
[TD]Sub Hide_Day()
Dim Num_Col As Long
'This instruction cleans the content of the cells in your calendar
Range("B7:AF13").ClearContents
For Num_Col = 30 To 32
' Test if the month of the cells (row 6) is the same of the month selected (cell A1 or cells(1,1))
If Month(Cells(6, Num_Col)) <> Cells(1, 1) Then
Columns(Num_Col).Hidden = True
Else
Columns(Num_Col).Hidden = False
End If
Next
End Sub[/TD]
[/TR]
[/TABLE]