Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Dynamic naming of worksheets

Hi,
I am developing a macro in which I add new sheets to a database every time I
export data to it. In order to recognize these sheets, I would like to be
able to make the name of the sheet equal to the contents of a cell in the
exported sheet. Currently, the code reads

Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Name"

Is there anyway that I can make the "Name" - part into a dynamic
cell-reference?

Thanks
Zyvind
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Dynamic naming of worksheets

Just use:


Sheets("Sheet1").Name = Sheets("Sheet1").Range("A1")

or

Sheets("Sheet1").Name = yourStringVariableHere

or

Sheets("Sheet1").Name = Sheets("Sheet1").Range
(yourrangenamevariable)

or

Sheets("Sheet1").Name = Sheets("Sheet1").cells(1,1)


etc

ttfn benm


Reply
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
Dynamic naming of range needed XXL User Excel Worksheet Functions 2 August 3rd 06 08:26 PM
Dynamic Sheet Tab Naming rpgun[_2_] Excel Programming 0 October 19th 04 12:36 AM
Dynamic Sheet Tab Naming rpgun Excel Programming 1 October 19th 04 12:01 AM
Dynamic Range Naming JMay Excel Programming 4 December 9th 03 11:17 PM
Naming Worksheets in VBE Don Guillett[_4_] Excel Programming 0 July 18th 03 08:17 PM


All times are GMT +1. The time now is 01:08 AM.

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

About Us

"It's about Microsoft Excel"