I need a macro that will change the names of the sheets in a workbook equal
to a given cell in those sheets
I need a macro that will change the names of the sheets in a workbook equal
to a given cell in those sheets
BOONER wrote:
>I need a macro that will change the names of the sheets in a workbook equal
>to a given cell in those sheets
sub userform_initialize()
dim x as long
For x = 1 to activeworkbook.sheets.count
activesheet.name = sheets(x).range("A").value
next x
end sub
prec_tec@yahoo.com
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200605/1
Thanks this puts me on the right track. However, for some reason it is
naming the first sheet with data pulled from the third.
"Crowbar via OfficeKB.com" wrote:
> BOONER wrote:
> >I need a macro that will change the names of the sheets in a workbook equal
> >to a given cell in those sheets
>
>
> sub userform_initialize()
>
> dim x as long
> For x = 1 to activeworkbook.sheets.count
> activesheet.name = sheets(x).range("A").value
> next x
>
> end sub
>
> prec_tec@yahoo.com
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.a...mming/200605/1
>
Okay, this works..........Thanks a lot Crowbar
Dim x As Long
For x = 3 To ActiveWorkbook.Sheets.Count
Sheets(x).Activate
ActiveSheet.Name = Sheets(x).Range("I7").Value
Next x
"BOONER" wrote:
> Thanks this puts me on the right track. However, for some reason it is
> naming the first sheet with data pulled from the third.
>
> "Crowbar via OfficeKB.com" wrote:
>
> > BOONER wrote:
> > >I need a macro that will change the names of the sheets in a workbook equal
> > >to a given cell in those sheets
> >
> >
> > sub userform_initialize()
> >
> > dim x as long
> > For x = 1 to activeworkbook.sheets.count
> > activesheet.name = sheets(x).range("A").value
> > next x
> >
> > end sub
> >
> > prec_tec@yahoo.com
> >
> > --
> > Message posted via OfficeKB.com
> > http://www.officekb.com/Uwe/Forums.a...mming/200605/1
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks