LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error Handling driving me crazy. Please help


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Driving me CRAZY~ please help Tara New Users to Excel 0 July 7th 08 07:29 PM
Sorry for reposting - but this is driving me crazy! Bean123r Excel Discussion (Misc queries) 1 January 27th 06 02:31 PM
VLOOKUP driving me crazy LB79 Excel Discussion (Misc queries) 5 December 13th 05 04:14 PM
basic...but driving me crazy! hawsoon13 Excel Discussion (Misc queries) 3 May 7th 05 01:27 PM
Driving me crazy! Dick Kusleika[_3_] Excel Programming 0 October 21st 03 10:18 PM


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"