Carly
Active Member
- Joined
- Aug 21, 2002
- Messages
- 370
We run a report each month which consists of opening a file for a rep area, manipulating the data, saving, then opening the next rep area and doing the same thing.
The problem we have is that there is not always data for every rep area, but we do not know which ones as they may be different each month.
We run the macro by having one module which runs each of the macros in turn:
i.e
Sub Run
Application.Run "reparea1"
Application.Run "reparea2"
End Sub
How do I write into the macro, if there isn't a file for reparea1 to open, stop the macro and continue with reparea2 module.
Please help
Carly
The problem we have is that there is not always data for every rep area, but we do not know which ones as they may be different each month.
We run the macro by having one module which runs each of the macros in turn:
i.e
Sub Run
Application.Run "reparea1"
Application.Run "reparea2"
End Sub
How do I write into the macro, if there isn't a file for reparea1 to open, stop the macro and continue with reparea2 module.
Please help
Carly