Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() This is driving me mad. Why am I getting this second error? I a combining two workbooks (and doing many other things to them) copyin tables sheet by sheet. Once the sheets in the workbook run out, a error is given. To get around this, I added the On Error GoT ScanTrack step. Then it steps through the second document sheet b sheet until the error: Run-time error '9' Subscript out of range stops the code. I have On Error GoTo ErrRequal. Shouldn't this b enough to step it out of the loop without stopping the code? How do get past this error? Do With Workbooks("Package Tracking3.xls").Worksheets(i) Range(.Cells(2, 1), .Cells(.Cells(65536, 1).End(xlUp).Row 15)).Copy Cells(65536, 1).End(xlUp)(2).Select ActiveSheet.Paste End With i = i + 1 On Error GoTo ScanTrack Loop ScanTrack: i = 1 Do With Workbooks("Scan Tracking3.xls").Worksheets(i) Range(.Cells(2, 1), .Cells(.Cells(65536, 1).End(xlUp).Row 15)).Copy Cells(65536, 1).End(xlUp)(2).Select ActiveSheet.Paste End With i = i + 1 On Error GoTo Format Loop Format -- hyyft ----------------------------------------------------------------------- hyyfte's Profile: http://www.excelforum.com/member.php...fo&userid=1318 View this thread: http://www.excelforum.com/showthread.php?threadid=26246 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Driving me CRAZY~ please help | New Users to Excel | |||
Sorry for reposting - but this is driving me crazy! | Excel Discussion (Misc queries) | |||
VLOOKUP driving me crazy | Excel Discussion (Misc queries) | |||
basic...but driving me crazy! | Excel Discussion (Misc queries) | |||
Driving me crazy! | Excel Programming |