E
Eric_G
I am attempting to use a variable which I've declared in the DECLARATIONS
section as the new name of a worksheet.
Public period_end As String
Public Sub Run_Monthly_Update()
period_end = InputBox("Enter reporting month-end in MMM-YYYY format")
......
ChDir "C:\List Security Downloads\"
Workbooks.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = period_end
AND that's where the macro bombs.... I get the "subsript out of range"
error. I've confirmed that the value of "period_end" is, in fact, the value
I input in response to the inputbox message by going to the "immediate" box.
For some reason, I can't re-name the worksheet in the new workbook.
Any suggestions?
section as the new name of a worksheet.
Public period_end As String
Public Sub Run_Monthly_Update()
period_end = InputBox("Enter reporting month-end in MMM-YYYY format")
......
ChDir "C:\List Security Downloads\"
Workbooks.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = period_end
AND that's where the macro bombs.... I get the "subsript out of range"
error. I've confirmed that the value of "period_end" is, in fact, the value
I input in response to the inputbox message by going to the "immediate" box.
For some reason, I can't re-name the worksheet in the new workbook.
Any suggestions?