whiteghost
Well-known Member
- Joined
- Nov 22, 2002
- Messages
- 500
I have a macro which opens a file then calls another macro to copy details from the newly opened file nad paste the in a workbook.It repeats trhis operation with twenty different files.
The code repeats like that until
Workbooks.Open Filename:"c:\translog\ " & strmth & "20.xls"
Call trans1
end sub
If an error happens ( the common error being one othe files is missing)
how can I get the error handling to resume next +1 line ( in other words resume but not with Call trans1)
thanks
Code:
strmth = inputbox("DO IT")
on error resume next
Workbooks.Open Filename:"c:\translog\ " & strmth & "1.xls"
Call trans1
Workbooks.Open Filename:"c:\translog\ " & strmth & "2.xls"
Call trans1
Workbooks.Open Filename:"c:\translog\ " & strmth & "3.xls"
Call trans1
The code repeats like that until
Workbooks.Open Filename:"c:\translog\ " & strmth & "20.xls"
Call trans1
end sub
If an error happens ( the common error being one othe files is missing)
how can I get the error handling to resume next +1 line ( in other words resume but not with Call trans1)
thanks