Hi-
I got the Subscript out of range error on this code:
Sub FillInValue()
Dim Num As Integer
Num = Application.InputBox("Please Enter the Period"
Worksheets("WEEKONE"
.Range("C10"
.Value = Workbooks("202forecast.xls"
.Worksheets(Num).Range("C5"
.Value
End Sub
I have one sheet for each period, so based on the period number they put in, the value from a cell on that sheet should get filled in on another workbook. I'll be doing that for a bunch of cells.
I clicked on help and looked at the possible reasons for the error. I'm not doing an array so I'm guessing it thinks the collection item doesn't exist? I have 13 sheets and put in a number like 2 or 5 and I get the error. It highlights this line "Worksheets("WEEKONE"
....."
Any ideas you'd like to share?
Thank you -
I got the Subscript out of range error on this code:
Sub FillInValue()
Dim Num As Integer
Num = Application.InputBox("Please Enter the Period"
Worksheets("WEEKONE"
End Sub
I have one sheet for each period, so based on the period number they put in, the value from a cell on that sheet should get filled in on another workbook. I'll be doing that for a bunch of cells.
I clicked on help and looked at the possible reasons for the error. I'm not doing an array so I'm guessing it thinks the collection item doesn't exist? I have 13 sheets and put in a number like 2 or 5 and I get the error. It highlights this line "Worksheets("WEEKONE"
Any ideas you'd like to share?
Thank you -