View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
cht13er cht13er is offline
external usenet poster
 
Posts: 141
Default Name a worksheet using a cell

Below is some code that you might find as being a bit more versatile.
What it will do is take cell contents from column 1 and create a new sheet
with that name .. in the correct order!

_!_!!_!_!_!__!_!_!_!_!_!_!_
Public Sub CreateSheetNamesFromList()

Dim Nayme As String
Dim K As Byte
K = 1

Range("a1").Select 'this is the first cell in List

Do Until ActiveCell.Value = "" 'Loop until a blank cell is encountered
Nayme = ActiveCell.Value
Sheets.Add
ActiveSheet.Name = Nayme
Sheets(Nayme).Move After:=Sheets(K + 1)
Sheets("List").Select
ActiveCell.Offset(1, 0).Select
K = K + 1
Loop

End Sub
!_!_!!_!_!_!_!_!_!_!_

--
Chris Togeretz
Ontario, Canada


"ineedhelp2" wrote:


I want to name the tab in my worksheet based on what cell A1 says. Is
this possible?


--
ineedhelp2
------------------------------------------------------------------------
ineedhelp2's Profile: http://www.excelforum.com/member.php...o&userid=26298
View this thread: http://www.excelforum.com/showthread...hreadid=401594