Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default return sheet name to cell.


I have several worksheets and I will constantly create more worksheets.
on one of me worksheets I want to insert the name of each worksheet in
my workbook into a table.

I would like for the info to be entered in the chart at b12 and then
continue on downwards b13, etc..

on the page that contains the table there is currently no code attached
to it.

please provide correct coding info to accomplish this task.


--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile: http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=466570

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default return sheet name to cell.

Hi Oberon,

Try:

'========================
Public Sub ListSheets()
Dim tSH As Worksheet
Dim SH As Worksheet
Dim Rng As Range
Dim i As Long
Const ListAddress As String = "B12"

Set tSH = ThisWorkbook.Sheets("Sheet1") '<<==== CHANGE

Set Rng = tSH.Range(ListAddress)

For Each SH In ThisWorkbook.Sheets
If Not SH.Name = tSH.Name Then
Rng.Offset(i).Value = SH.Name
i = i + 1
End If
Next SH

End Sub
'========================

---
Regards,
Norman



"oberon.black"
wrote in message
news:oberon.black.1v6hud_1126415119.3323@excelforu m-nospam.com...

I have several worksheets and I will constantly create more worksheets.
on one of me worksheets I want to insert the name of each worksheet in
my workbook into a table.

I would like for the info to be entered in the chart at b12 and then
continue on downwards b13, etc..

on the page that contains the table there is currently no code attached
to it.

please provide correct coding info to accomplish this task.


--
oberon.black
------------------------------------------------------------------------
oberon.black's Profile:
http://www.excelforum.com/member.php...o&userid=26732
View this thread: http://www.excelforum.com/showthread...hreadid=466570



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
find common text in cell in column in sheet then return total amou leeona Excel Worksheet Functions 1 June 7th 08 04:43 AM
Using cell as worksheet name to return data on that sheet Rookie_User Excel Worksheet Functions 4 January 28th 07 06:27 AM
Cell and Sheet Reference/Return Andrew Excel Worksheet Functions 3 July 7th 05 11:01 PM
return cell from named sheet AndrewB Excel Discussion (Misc queries) 1 April 18th 05 02:47 AM
How can I cause a cell to return the sheet name i.e. sheet 1? Matt Excel Worksheet Functions 2 February 15th 05 08:38 PM


All times are GMT +1. The time now is 10:50 AM.

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

About Us

"It's about Microsoft Excel"