Conoro1894
New Member
- Joined
- Nov 7, 2016
- Messages
- 9
The following is just part of my code. i am getting an Error 9: Subscript out of range. I've tried a few things in order to correct this but nothing seems to change it.
r = 2 c = 2
i = 2
LastRowNumber = xlLastRow(Sheets("Data"))
Do While Sheets("DATA").Cells(r, 4) <> ""
Sheets("DATA").Activate
Sheets("DATA").Cells(i, 10).Name = "sheet"
Sheets("DATA").Cells(c, 11).Name = "cell"
Sheets("DATA").Cells(r, 4).Copy
Sheets(Range("sheet").Value).Activate
Range(Range("cell").Value).Select 'Activate
CenterOnCell Range((Range("cell").Value))
r = 2 c = 2
i = 2
LastRowNumber = xlLastRow(Sheets("Data"))
Do While Sheets("DATA").Cells(r, 4) <> ""
Sheets("DATA").Activate
Sheets("DATA").Cells(i, 10).Name = "sheet"
Sheets("DATA").Cells(c, 11).Name = "cell"
Sheets("DATA").Cells(r, 4).Copy
Sheets(Range("sheet").Value).Activate
Range(Range("cell").Value).Select 'Activate
CenterOnCell Range((Range("cell").Value))