inserting worksheet and name

  • Thread starter Thread starter Bill Starr
  • Start date Start date
B

Bill Starr

I saw some code somewhere, but I can't find it anymore.

I need to insert a worksheet and then name this new
sheet 'vacation'. The workbook may already have a sheet
called 'sheet1' or 'sheet2'.

thanks.
Bill
 
worksheets.add
on error resume next
activesheet.name = "vacation"
if err.number <> 0 then
msgbox "couldn't rename"
err.clear
end if
 

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