View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
raraschek raraschek is offline
external usenet poster
 
Posts: 12
Default rename the new worksheet

i kindly ask for help.
in sheet1 i have a list, i need to create a new worksheet and name it with
the value of cell which i selected in this list. i tried something like this,
but it´s surely very simple

Sub Create()
Dim ws As Worksheet
Dim wsName As String
If Not IsEmpty(ActiveSheet.ActiveCell.Value) Then
Set ws = Worksheets.Add
ws.Move After:=Sheets(Sheets.Count)
ws.Name = ActiveSheet.ActiveCell.Text
End If
End Sub