Hi,
I orginally started this code by recording it from a macro and then have put in some vba surrounding it so its a bit messy! The code is behind a button on a user form. What it does is create a copy of a sheet called "Master" and then names it the date which has been entered on to a text box - tbDate -on a user form. What I would like to do is check to see if the name that has been entered in to tbDate is already a sheet name and if so stop the procedure and pop up with a text box, but if it doesn't exsist then keep on doing the rest of the code. I've tried doing it with some code I found on http://www.ozgrid.com/VBA/IsWorkbookOpen.htm which states:
But I couldn't get this working with my code, or with using information from tbDate
The code which I am working with is:
Any help would be very much appericated, I hope all this makes sense!
Thanks a lot,
Dave
Bookmarks