Hi Folks,
I want to create new sheets when I click on the "Create Sheet" button (Sheet name should be same as values of Cells A2, A3, A4 till A10). If the Sheet name is already exist I want to show a warning message like "Some sheets already exist, Do you want to delete the existing sheet and create new?” And if I click on the "OK" button (in the Warming Message box) I want to create sheets If I click “Cancel” button nothing to do. Please help me.. I have attached a file of what I'm trying to accomplish. Thanks in advance for your expertise!
Thanks in advance.
Joshi
So should just blank sheets be created with no data in them? Or do you want some existing tab to be copied and then certain cells to be cleared so you can enter fresh data? Kind of like a template?
Cheers,
Arlette
If I helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Perhaps like this?
Alf
I went a different approach to Alf(I did this a day or so ago, so may as well post it up).
Activate the cell you want to check if a sheet exist and click create sheet.
Last edited by JapanDave; 01-02-2012 at 07:54 AM.
If you are happy with the answer, please click the Star icon in the below left hand corner.
Good sites to start learning.
snb's VBA Help Files
Jerry Beaucaires Excel Assistant
J & R Excel Consultancy Services
How to post code correctly: Correct Code Posting
Hi JapanDeve,
Its almost OK, but I need to add one more criteria, If Sheet does not existing the macro should create new sheet based on active cell value "Sheet Name = Active cell value". Can you please help me?
Thanks in advance
Joshi
Hey,
Try this.
If you are happy with the answer, please click the Star icon in the below left hand corner.
Good sites to start learning.
snb's VBA Help Files
Jerry Beaucaires Excel Assistant
J & R Excel Consultancy Services
How to post code correctly: Correct Code Posting
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks