Actually i want to make the button call CreatePivotTable in accordance with month for today,
So if today month is january, then the button do
I confuse how to make it, anyone can help?
So if today month is january, then the button do
Code:
Call CreatePivotTableJan
Call CreatePivotTable2Jan
Call AutoFit
I confuse how to make it, anyone can help?
Code:
Private Sub CommandButton1_Click()
If Month(today()) = 1 Then
Call CreatePivotTableJan
Call CreatePivotTable2Jan
Call AutoFit
If Month(today()) = 2 Then
Call CreatePivotTableFeb
Call CreatePivotTable2Feb
Call AutoFit
If Month(today()) = 3 Then
Call CreatePivotTableMar
Call CreatePivotTable2Mar
Call AutoFit
Else
Call CreatePivotTableApr
Call CreatePivotTable2Apr
Call AutoFit
End Sub