ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   rename a group of spreadsheets in a workbook (https://www.excelbanter.com/excel-discussion-misc-queries/160485-rename-group-spreadsheets-workbook.html)

Bob

rename a group of spreadsheets in a workbook
 
is there an easy way to create a workbook with 31 spreadsheets with names
like 10-1, 10-2, etc.? It is a long process to rename each spreadsheet each
month.

thanks,

bob

Gary''s Student

rename a group of spreadsheets in a workbook
 
Sub add_a_bunch()
For i = 1 To 31
Worksheets.Add.Name = "10-" & i
Next
End Sub

--
Gary''s Student - gsnu200748


"bob" wrote:

is there an easy way to create a workbook with 31 spreadsheets with names
like 10-1, 10-2, etc.? It is a long process to rename each spreadsheet each
month.

thanks,

bob



All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com