Putting Sheet Names on a list

  • Thread starter Thread starter arcq
  • Start date Start date
A

arcq

HI!

Can anybody please tell me how to put the list of Sheet Names in a
list. Like for example, in a particular cell, a list would show
"Sheet1", "Sheet2", & "Sheet3". Would it be possible also, that if a
new Sheet will be added, ie. "Sheet4", it would just add up on that
list.

That list will be then used as choices to what particular sheet I would
print.

The situation is, I have a table on each sheet. Same format. Sometimes,
new sheet/s is/are added. Within that table, I have series of codes
taking data in one row, pasting it in a form, and give print. Then,
goes to the next row...and so on and so forth.

Please help. Thanks a lot people of great minds.....

Best regards.
 
There is no worksheet add event to trap to update the list, so you have a
problem.

One way to do it might be to use OnTime to run every say 10 secs and rebuild
the list, but it would be resource hungry.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
I use the following often; It's not exactly what your asking
but I find it helpful - and maybe you can use it to get to your solution
In a standard module paste in:

Sub ListOutSheetNames()
Application.ScreenUpdating = False
Dim Nsheet As Worksheet
Set Nsheet = Sheets.Add
Dim WS As Worksheet
Dim r As Integer
r = 1
For Each WS In Worksheets
If WS.Name <> Nsheet.Name Then
Nsheet.Range("A" & r) = WS.Name
r = r + 1
End If
Next WS
Application.DisplayAlerts = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

Works well for me..
HTH
 
Jim said:
I use the following often; It's not exactly what your asking
but I find it helpful - and maybe you can use it to get to your solution
In a standard module paste in:

Sub ListOutSheetNames()
Application.ScreenUpdating = False
Dim Nsheet As Worksheet
Set Nsheet = Sheets.Add
Dim WS As Worksheet
Dim r As Integer
r = 1
For Each WS In Worksheets
If WS.Name <> Nsheet.Name Then
Nsheet.Range("A" & r) = WS.Name
r = r + 1
End If
Next WS
Application.DisplayAlerts = False
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

Works well for me..
HTH

i'll try that. thanks a lot. and as soon i can make it to work adding
some other functions, i'll let you know. more power to you.
 

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