From: Cue on
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
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
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
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
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