Hereby a subroutine which fill the active cell and the cells under it with
the number of worksheets and their names.
NB If you want other sheets (chartsheets etc. ) as well you have to make
some adjustments.
Sub GetNames()
Dim A As Integer, WksName As String
A = ActiveWorkbook.Worksheets.Count
ActiveCell.Value = "Number of worksheets = " & A
For I = 1 To A
ActiveCell.Offset(I, 0).Value = Worksheets(I).Name
Next
End Sub
--
Regards,
Auk Ales
* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
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.