Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Name
Hi,
I am wondering if it is possible to create a formula that will tell me the name of a particular tab in a workbook. I have many tabs and I would like to have a summary tab at the beginning that lists all of the tab names in the book without actually having to type the names. Any help would be appreciated. Thx! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Tab Name
Private Sub ListSheets()
'list of sheet names starting at A1 Dim Rng As Range Dim i As Integer Set Rng = Range("A1") For Each Sheet In ActiveWorkbook.Sheets Rng.Offset(i, 0).Value = Sheet.Name i = i + 1 Next Sheet End Sub If not familiar with VBA and macros, see David McRitchie's site for more on "getting started". http://www.mvps.org/dmcritchie/excel/getstarted.htm In the meantime.......... First...create a backup copy of your original workbook. To create a General Module, hit ALT + F11 to open the Visual Basic Editor. Hit CRTL + r to open Project Explorer. Find your workbook/project and select it. Right-click and InsertModule. Paste the code in there. Save the workbook and hit ALT + Q to return to your workbook. Run or edit the macro by going to ToolMacroMacros. You can also assign this macro to a button or a shortcut key combo. Gord Dibben MS Excel MVP On Thu, 12 Jul 2007 09:08:28 -0700, GP wrote: Hi, I am wondering if it is possible to create a formula that will tell me the name of a particular tab in a workbook. I have many tabs and I would like to have a summary tab at the beginning that lists all of the tab names in the book without actually having to type the names. Any help would be appreciated. Thx! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|