LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default adding a sheet and renaming

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming a sheet [email protected] Excel Discussion (Misc queries) 3 May 30th 08 09:26 PM
Renaming a sheet Darin Kramer Excel Programming 2 September 20th 05 11:48 AM
Renaming adding and deleting directory alanford Excel Programming 2 February 16th 05 11:08 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM
renaming the active sheet tjtjjtjt[_2_] Excel Programming 1 January 27th 04 04:00 PM


All times are GMT +1. The time now is 06:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"