Hi, I have 2 procedures main_proc and proc_read_data. My concern is what happens if error occurs in proc_read_data ? Is there any way we can goto to err_main_proc if error occurs in proc_read_data ?<BR><BR>Thanks<BR><BR>sub main_proc()<BR> Dim objExcel As Excel.Application<BR> on error goto err_main_proc<BR><BR> Set objExcel = New Excel.Application<BR> objExcel.Workbooks.Open FileName:=sFileToOpen, UpdateLinks:=0<BR><BR> Call proc_read_data(objExcel, 1, 100);<BR> Call proc_read_data(objExcel, 2, 200);<BR><BR><BR>err_main_proc:<BR> msgbox "Error processing excel sheet."<BR> objExcel.Quit<BR> Set objExcel = Nothing<BR><BR>end sub<BR><BR>sub proc_read_data(byref objExcel, SheetNo, Dept)<BR><BR>:<BR>objExcel.Sheets(SheetNo).Select< BR>:<BR>Amount = objExcel.Cells(4, 1).value<BR>:<BR>:<BR>end sub