View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Adding, naming Worksheets sequentially

Try something like

With ThisWorkbook.Worksheets
.Add(after:=.Item(.Count)).Name = CInt(.Item(.Count).Name) + 1
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email on the web site)

"Sol Apache" wrote in message
...
I have workbooks with worksheets numbered sequentially 1, 2, 3 etc. -
sometimes over 100 worksheets.

I'd like to be able to add a worksheet, put it at the end, and name it
last
name + 1, so if the last old worksheet was named 50, the new one will be
51.

I could not find any help in VB on this.

Thanks for any help




Sol