Keith.Jackson
Board Regular
- Joined
- Mar 31, 2005
- Messages
- 115
I have an application that uses the following code:
Application.ActiveWindow.ActivateNext
Range("A1:Z500").Select
Selection.Copy
Application.ActiveWindow.ActivatePrevious
ActiveSheet.Paste
When there is no other workbook open, the current workbook copies from itself.
How can I make the code show an error and end the procedure when there is no other open workbook?
Thanks
Application.ActiveWindow.ActivateNext
Range("A1:Z500").Select
Selection.Copy
Application.ActiveWindow.ActivatePrevious
ActiveSheet.Paste
When there is no other workbook open, the current workbook copies from itself.
How can I make the code show an error and end the procedure when there is no other open workbook?
Thanks