Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MA MA is offline
external usenet poster
 
Posts: 15
Default copy all sheet tab names of a file in a cell

hi,

I want to copy the names of all existing sheet names of a file as a list in
any of the sheets of the file.

Your expert advice is highly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default copy all sheet tab names of a file in a cell


sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MA" wrote in message
...
hi,

I want to copy the names of all existing sheet names of a file as a list
in
any of the sheets of the file.

Your expert advice is highly appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.misc
MA MA is offline
external usenet poster
 
Posts: 15
Default copy all sheet tab names of a file in a cell

Hi Don,

Thanks for your quick response. This is working perfectly fine, if can you
help in the scenario the list is required to be copied on to a specific cell
reference in a specific sheet of the file.

thanks for your help.

MA

"Don Guillett" wrote:


sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MA" wrote in message
...
hi,

I want to copy the names of all existing sheet names of a file as a list
in
any of the sheets of the file.

Your expert advice is highly appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default copy all sheet tab names of a file in a cell

Private Sub ListSheets()
'list of sheet names starting at H5
Dim rng As Range
Dim I As Integer
Set rng = Sheets("Sheet3").Range("H5") 'adjust sheetname and range
For Each Sheet In ActiveWorkbook.Sheets
rng.Offset(I, 0).Value = Sheet.Name
I = I + 1
Next Sheet
End Sub


Gord Dibben MS Excel MVP

On Wed, 9 Sep 2009 09:15:02 -0700, MA wrote:

Hi Don,

Thanks for your quick response. This is working perfectly fine, if can you
help in the scenario the list is required to be copied on to a specific cell
reference in a specific sheet of the file.

thanks for your help.

MA

"Don Guillett" wrote:


sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MA" wrote in message
...
hi,

I want to copy the names of all existing sheet names of a file as a list
in
any of the sheets of the file.

Your expert advice is highly appreciated.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default copy all sheet tab names of a file in a cell

Pretty simple. Just add the destination sheet and adjust the i starting row
and ,1 starting column
Below starts at cell C7
Sub toc()
For i = 1 To Sheets.Count
'.cells(i,1).value=sheets(i).name
Sheets("sheet10").Cells(i + 6, 3).Value = Sheets(i).Name
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MA" wrote in message
...
Hi Don,

Thanks for your quick response. This is working perfectly fine, if can you
help in the scenario the list is required to be copied on to a specific
cell
reference in a specific sheet of the file.

thanks for your help.

MA

"Don Guillett" wrote:


sub toc()
for i=1 to sheets.count
cells(i,1).value=sheets(i).name
next i
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MA" wrote in message
...
hi,

I want to copy the names of all existing sheet names of a file as a
list
in
any of the sheets of the file.

Your expert advice is highly appreciated.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy file names americana Excel Discussion (Misc queries) 1 July 19th 09 05:44 PM
copy of formula contains file names into other cells Turk Excel Worksheet Functions 2 March 6th 07 01:14 AM
how can I copy file names into cells SAM SEBAIHI Excel Discussion (Misc queries) 5 January 20th 07 06:55 PM
copy file names covi2k2 Excel Discussion (Misc queries) 3 November 17th 05 02:19 PM
need to copy a long list of file names gilcola Excel Discussion (Misc queries) 6 August 19th 05 12:55 AM


All times are GMT +1. The time now is 05:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"