I'm trying to create a code that would refer to an excel sheet using a variable, but I'm stuck on the phase where I have to choose the sheet based on the variable text, which is the month abbreviation.
Any additional assistance would be very appreciated since it was the only way I could proceed to choose the desired sheet based on the monthly index.
Dim DestWS1 As Worksheet
Dim InputValue As Integer
InputValue = InputBox("Please enter your month index number", "Selecting month index to generate your report")
' Print the name of the airport to the Immediate Window(Ctrl + G)
Dim MonthIndexResult As String
MonthIndexResult = _
"=LOOKUP(" & InputValue & ",InputData!R3C17:R14C17,InputData!R3C16:R14C16)"
Set DestWS1 = ThisWorkbook.Sheets(" & MonthIndexResult & ")
Any additional assistance would be appreciated because it was the only way I could proceed to choose the desired sheet based on the month index.