G
Guest
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
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