ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename active sheet with current file name (https://www.excelbanter.com/excel-programming/366819-rename-active-sheet-current-file-name.html)

[email protected]

Rename active sheet with current file name
 
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs


Ardus Petus

Rename active sheet with current file name
 
Sub tester()
ActiveSheet.name=ActiveWorkbook.name
end sub

HTH
--
AP

a écrit dans le message de news:
...
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs




[email protected]

Rename active sheet with current file name
 
thxs!! - how can i remove the .xls from the name


Ardus Petus wrote:
Sub tester()
ActiveSheet.name=ActiveWorkbook.name
end sub

HTH
--
AP

a écrit dans le message de news:
...
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs



Ardus Petus

Rename active sheet with current file name
 
ActiveSheet.name=Left(ActiveWorkbook.name, Len(Activeworkbook.name)-4)

HTH
--
AP

a écrit dans le message de news:
...
thxs!! - how can i remove the .xls from the name


Ardus Petus wrote:
Sub tester()
ActiveSheet.name=ActiveWorkbook.name
end sub

HTH
--
AP

a écrit dans le message de news:
...
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs




Duncan[_5_]

Rename active sheet with current file name
 
try

ActiveSheet.Name = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) -
4)

Duncan

wrote:

thxs!! - how can i remove the .xls from the name


Ardus Petus wrote:
Sub tester()
ActiveSheet.name=ActiveWorkbook.name
end sub

HTH
--
AP

a écrit dans le message de news:
...
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs



[email protected]

Rename active sheet with current file name
 
thxs - work great !!
Ardus Petus wrote:
ActiveSheet.name=Left(ActiveWorkbook.name, Len(Activeworkbook.name)-4)

HTH
--
AP

a écrit dans le message de news:
...
thxs!! - how can i remove the .xls from the name


Ardus Petus wrote:
Sub tester()
ActiveSheet.name=ActiveWorkbook.name
end sub

HTH
--
AP

a écrit dans le message de news:
...
Does anybody has a macro which would rename my active sheet with
current file name?

Thxs




All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com