ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Name a sheet using letters from a string? (https://www.excelbanter.com/excel-programming/386979-name-sheet-using-letters-string.html)

[email protected]

Name a sheet using letters from a string?
 
I'd like to know how to name the active sheet using the first 6
characters from a string variable. For example: if the string
variable = "Customer" then I want to name the active sheet "Custom"

Many thanks!


PCLIVE

Name a sheet using letters from a string?
 
Something like this may work.

ActiveSheet.Name = Left(variable, 6)

HTH,
Paul

wrote in message
oups.com...
I'd like to know how to name the active sheet using the first 6
characters from a string variable. For example: if the string
variable = "Customer" then I want to name the active sheet "Custom"

Many thanks!





All times are GMT +1. The time now is 01:39 PM.

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