Good day.
I am running the provided MACRO to auto populate Months in consecutive cells. It starts with Cell A2 (starting range) in which there is a date Oct 2023. This will be added to a larger MACRO and I want to learn how to add a message box telling the user to enter a date in the MMM YYYY format which will fill Cell A2 and then continue the execution of the MACRO. I want to be able to change the start date every time this part of the MACRO runs.
Sub ztest()
'
' ztest Macro
'
'Activate worksheet
Worksheets("Sheet1").Activate
'Select source range
Set startingRange = ActiveSheet.Range("A2")
'Autofill destination range with xlFillMonths
startingRange.AutoFill Destination:=Range("A2:X2"), Type:=xlFillMonths
End Sub
Thanks to all for the lesson.
I am running the provided MACRO to auto populate Months in consecutive cells. It starts with Cell A2 (starting range) in which there is a date Oct 2023. This will be added to a larger MACRO and I want to learn how to add a message box telling the user to enter a date in the MMM YYYY format which will fill Cell A2 and then continue the execution of the MACRO. I want to be able to change the start date every time this part of the MACRO runs.
Sub ztest()
'
' ztest Macro
'
'Activate worksheet
Worksheets("Sheet1").Activate
'Select source range
Set startingRange = ActiveSheet.Range("A2")
'Autofill destination range with xlFillMonths
startingRange.AutoFill Destination:=Range("A2:X2"), Type:=xlFillMonths
End Sub
Thanks to all for the lesson.