Hi all,
I created an automatic calendar following this website How to make automatic calendar in Excel
to hide the last column of the date where there are lesser day in a month, the following coding was use.
Sub Hide_Day()
Dim Num_Col As Long
For Num_Col = 30 To 32
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
however, this code seems to be for dates displayed horizontally. but for my calendar, my dates are displayed vertically. How should i edit the code to ensure that dates are hidden?
additionally, i would like to also to clear the content of my calendar when i choose another item from my drop down list.
hope someone can assist me in this as I am not adept in coding.
Thanks
I created an automatic calendar following this website How to make automatic calendar in Excel
to hide the last column of the date where there are lesser day in a month, the following coding was use.
Sub Hide_Day()
Dim Num_Col As Long
For Num_Col = 30 To 32
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
however, this code seems to be for dates displayed horizontally. but for my calendar, my dates are displayed vertically. How should i edit the code to ensure that dates are hidden?
additionally, i would like to also to clear the content of my calendar when i choose another item from my drop down list.
hope someone can assist me in this as I am not adept in coding.
Thanks