I got a simple question related to programming in Excel for the programming guru's out there. I created an offer template which generates up to 10 sheets. Everytime the user generates the offer sheets, the old sheets will be deleted first, and then new sheets will be generated.
To seal any unwanted errors off i created a "Sub" and a Function to create new sheets, which return an error if the sheet already exists. Im not sure which of the two to use. (no one to discuss it with either.)
so the questions are:
- which method is preferred and why
- would you solve it different
i suppose i could also use a For Each [sheet] ..Next statement to check if a sheet exists and even cancel the event before the sheet(x).copy occurs.
But then still i want to return some boolean value from my "create sheet" subroutine to my main routine
Please Login or Register to view this content.
Please Login or Register to view this content.
Bookmarks