macro_user
Board Regular
- Joined
- Mar 9, 2009
- Messages
- 101
hi...
i have written some macro in the destination sheet, say sheet2... when i click a button, the macro starts which copies data from an existing worksheet say sheet1 to sheet2 in the same workbook... if at all , somehow, the base sheet, sheet1 is deleted, then i would be getting an error saying "Subscript out of range" in the VB interface... but how will i display this error msg in a msgbox in the excel interface and exit from the sub... i hope im making myself clear...
i have written some macro in the destination sheet, say sheet2... when i click a button, the macro starts which copies data from an existing worksheet say sheet1 to sheet2 in the same workbook... if at all , somehow, the base sheet, sheet1 is deleted, then i would be getting an error saying "Subscript out of range" in the VB interface... but how will i display this error msg in a msgbox in the excel interface and exit from the sub... i hope im making myself clear...