Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello. With excel macro, I want to add a sheet and rename the
sheet but the name is not specific, it is a variable. For example, Sub b() Sheets.Add.Name = "aaaa" End Sub works fine but here , the sheet name is not variable, it is specific named "aaaa", However, the below gives error Sub b() Dim a As String a = "aaaa" Sheets.Add.Name = a End Sub What can I do? Thanks alot. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Works fine for me. It will fail if that sheet already exists.
-- HTH Bob Phillips (remove nothere from the email address if mailing direct) "oercim" wrote in message oups.com... Hello. With excel macro, I want to add a sheet and rename the sheet but the name is not specific, it is a variable. For example, Sub b() Sheets.Add.Name = "aaaa" End Sub works fine but here , the sheet name is not variable, it is specific named "aaaa", However, the below gives error Sub b() Dim a As String a = "aaaa" Sheets.Add.Name = a End Sub What can I do? Thanks alot. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK. sorry, it works fine for me too. Thanks alot.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Renaming a sheet | Excel Discussion (Misc queries) | |||
Renaming a sheet | Excel Programming | |||
Renaming adding and deleting directory | Excel Programming | |||
Naming & renaming a sheet tab | Excel Worksheet Functions | |||
renaming the active sheet | Excel Programming |