I have a large document with constantly changing tabs. I would like to
create a document at the front with the tab names. Is there a way to do this
automatically? Or would it be quicker to just type them in?
I have a large document with constantly changing tabs. I would like to
create a document at the front with the tab names. Is there a way to do this
automatically? Or would it be quicker to just type them in?
Alice, here is one way,
Sub Sheet_Names()
Dim ws As Worksheet
With Worksheets.Add
.Name = "Sheet Names"
.Move before:=Worksheets(1)
End With
Sheets("Sheet Names").Activate
Range("a1").Activate
For Each ws In Worksheets
If ws.Name <> "Sheet Names" Then
ActiveCell.Formula = ws.Name
ActiveCell.Offset(1, 0).Select
End If
Next
End Sub
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
"AliceNXLand" <[email protected]> wrote in message
news:[email protected]...
>I have a large document with constantly changing tabs. I would like to
> create a document at the front with the tab names. Is there a way to do
> this
> automatically? Or would it be quicker to just type them in?
Thanks, Paul, I still need help with where to paste this information. I'm
not really familiar with macros. I understand the concept, but, haven't
practiced much. If this will take too long on the forum, please e-mail me.
Thanks, VERY MUCH.
"Paul B" wrote:
> Alice, here is one way,
>
> Sub Sheet_Names()
> Dim ws As Worksheet
> With Worksheets.Add
> .Name = "Sheet Names"
> .Move before:=Worksheets(1)
> End With
> Sheets("Sheet Names").Activate
> Range("a1").Activate
> For Each ws In Worksheets
> If ws.Name <> "Sheet Names" Then
> ActiveCell.Formula = ws.Name
> ActiveCell.Offset(1, 0).Select
> End If
> Next
> End Sub
>
> --
> Paul B
> Always backup your data before trying something new
> Please post any response to the newsgroups so others can benefit from it
> Feedback on answers is always appreciated!
> Using Excel 2002 & 2003
>
> "AliceNXLand" <[email protected]> wrote in message
> news:[email protected]...
> >I have a large document with constantly changing tabs. I would like to
> > create a document at the front with the tab names. Is there a way to do
> > this
> > automatically? Or would it be quicker to just type them in?
>
>
>
Thanks Paul! I got it to work. It's great. Now I can use this one to build
on for other stuff I need. Forget the last message.
"AliceNXLand" wrote:
> Thanks, Paul, I still need help with where to paste this information. I'm
> not really familiar with macros. I understand the concept, but, haven't
> practiced much. If this will take too long on the forum, please e-mail me.
> Thanks, VERY MUCH.
>
> "Paul B" wrote:
>
> > Alice, here is one way,
> >
> > Sub Sheet_Names()
> > Dim ws As Worksheet
> > With Worksheets.Add
> > .Name = "Sheet Names"
> > .Move before:=Worksheets(1)
> > End With
> > Sheets("Sheet Names").Activate
> > Range("a1").Activate
> > For Each ws In Worksheets
> > If ws.Name <> "Sheet Names" Then
> > ActiveCell.Formula = ws.Name
> > ActiveCell.Offset(1, 0).Select
> > End If
> > Next
> > End Sub
> >
> > --
> > Paul B
> > Always backup your data before trying something new
> > Please post any response to the newsgroups so others can benefit from it
> > Feedback on answers is always appreciated!
> > Using Excel 2002 & 2003
> >
> > "AliceNXLand" <[email protected]> wrote in message
> > news:[email protected]...
> > >I have a large document with constantly changing tabs. I would like to
> > > create a document at the front with the tab names. Is there a way to do
> > > this
> > > automatically? Or would it be quicker to just type them in?
> >
> >
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks