From: Cue on 24 Dec 2009 11:45 Hello, I am trying to rename a worksheet tab using the name of the workbook. Each code I've tried does not work. Does anybody have a simple macro to accomplish this? Thanks. -- Cue
From: Bob I on 24 Dec 2009 11:53 Perhaps assign file name to variable, then assign variable to Tab. Cue wrote: > Hello, > > I am trying to rename a worksheet tab using the name of the workbook. Each > code I've tried does not work. Does anybody have a simple macro to accomplish > this? > > Thanks.
From: CLR on 24 Dec 2009 12:07 Sub RenameSheet() Dim myname myname = ThisWorkbook.Name ActiveSheet.Select ActiveSheet.Name = myname Range("A1").Select End Sub Vaya con Dios, Chuck, CABGx3 "Cue" wrote: > Hello, > > I am trying to rename a worksheet tab using the name of the workbook. Each > code I've tried does not work. Does anybody have a simple macro to accomplish > this? > > Thanks. > -- > Cue
From: FSt1 on 24 Dec 2009 12:08 hi Sheets("sheet1").Name = ActiveWorkbook.Name regards FSt1 "Cue" wrote: > Hello, > > I am trying to rename a worksheet tab using the name of the workbook. Each > code I've tried does not work. Does anybody have a simple macro to accomplish > this? > > Thanks. > -- > Cue
From: Cue on 24 Dec 2009 12:24
Great! Thanks to both of you for your assistance. One thing i did not account for... Is there a way rename the tab with the filename with the ".xls"? -- Cue |