have Macro automatically delete and create sheets

  • Thread starter Thread starter web_surfer
  • Start date Start date
W

web_surfer

I have created a form and a command button that is assigned to a macr
to start that form.

What I would like for it to do is when the command button is pressed t
start the macro that opens the form

I want it to look at the sheets that are there.
If the sheets are not the one's the macro uses it will automaticall
delete the sheets and create new ones with certain names.

If you have seen something like this or knw how to do it, can someon
tell me where i can learn to program this
 
I have a "timecard" workbook that re-names the sheet "current" to the pay
period ending date (i.e. 03/31), then creates a new sheet named "current".
This is quite easy, and the simple way to see the function calls and
parameters is to record a macro in which you do all those things.

Start recording

Rename a sheet
Make a new sheet
Delete a sheet

Stop recording

You can edit the macro to create the sheet with whatever name you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top