View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default add new named sheet

One way:

Option Explicit
Sub testme01()

Dim newWks As Worksheet

Set newWks = Worksheets.Add
On Error Resume Next
newWks.Name = Worksheets("sheet1").Range("a1").Value
If Err.Number < 0 Then
MsgBox "couldn't rename sheet: " & newWks.Name
Err.Clear
End If
On Error Goto 0

End Sub



GREG CARTER wrote:

I want to add a worksheet to the workbook with a specific
name that is in a cell on an existing worksheet.
How can this be done??

Thanx ahead,
G. Carter


--

Dave Peterson