Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
Thanks to everyone who has been helping me with my macro. I have another question. I need the sheet to have the same name as the file name. I got it to work by using an input box, where the user has to enter the file name. I would like to avoid having to use the input box, and have the macro do it automatically. Is there any way to do that? I am using Excel 2003. Thanks, Carol |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
hi
sheet1.name = activeworkbook.name or activesheet.name = activeworkbook.name regards FSt1 "jjnotme" wrote: Thanks to everyone who has been helping me with my macro. I have another question. I need the sheet to have the same name as the file name. I got it to work by using an input box, where the user has to enter the file name. I would like to avoid having to use the input box, and have the macro do it automatically. Is there any way to do that? I am using Excel 2003. Thanks, Carol |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
"jjnotme" wrote in message
... Thanks to everyone who has been helping me with my macro. I have another question. I need the sheet to have the same name as the file name. I got it to work by using an input box, where the user has to enter the file name. I would like to avoid having to use the input box, and have the macro do it automatically. Is there any way to do that? I am using Excel 2003. Thanks, Carol In general, filenames might be too long, or contain characters not allowed in sheet names. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
Sheet names are limited to 31 characters (through xl 2003 afaik). You
could try something like this... ActiveSheet.Name = Left(ThisWorkbook.Name, 31) 'or right as far as that goes Cliff Edwards |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
"ward376" wrote in message
... Sheet names are limited to 31 characters (through xl 2003 afaik). You could try something like this... ActiveSheet.Name = Left(ThisWorkbook.Name, 31) 'or right as far as that goes That raises the issue of uniqueness of sheet names as the leading/trailing 31 characters might be the same for more than one file. Also, my recollection is that there are characters allowed in filenames that are not allowed in sheetnames. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
name the sheet the same as the file name
Yes it does raise the issue of duplicate sheet names. And there are
characters allowed/not allowed for file and sheet names, but more are allowed for sheet names than file names. * . " / \ [ ] : ; | = , not allowed in filenames (dot not allowed at end) : / \ ? * [ ] not allowed in sheet names Cliff Edwards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does a Multi-sheet/user file open on sheet two every time? | Excel Discussion (Misc queries) | |||
Split text file into Excel sheet and separate the final results intoa new sheet | Excel Worksheet Functions | |||
copy the same raws of all sheets from about a 100 file to a new sheet of a book and save the file | Setting up and Configuration of Excel | |||
Lookup on a sheet so that every time when file open it copes data from another file sheet | Excel Programming | |||
Updating excel sheet with selected data from another sheet in the same file | Excel Worksheet Functions |