I'm using the following code but get a runtime 424 error. Also, I would like to the sheet name in c17 to last cell
Private Sub CommandButton1_Click()
lastcell = ThisWorkbook.Worksheets("Master").Cells(Rows.Count, 1).End(xlUp).Row
For i = 17 To lastcell
With YhisWorkbook
newname = ThisWorkbook.Worksheets("Master").Cells(i, 1).Value
.Sheets.Add after:=.Sheets(.Sheets.Count)
ActiveSheet.Name = newname
End With
Next
ThisWorkbook.Worksheets("Master").Activate
ThisWorkbook.Worksheets("Master").Cells(1, 1).Select
End Sub
Thanks for the help...
Private Sub CommandButton1_Click()
lastcell = ThisWorkbook.Worksheets("Master").Cells(Rows.Count, 1).End(xlUp).Row
For i = 17 To lastcell
With YhisWorkbook
newname = ThisWorkbook.Worksheets("Master").Cells(i, 1).Value
.Sheets.Add after:=.Sheets(.Sheets.Count)
ActiveSheet.Name = newname
End With
Next
ThisWorkbook.Worksheets("Master").Activate
ThisWorkbook.Worksheets("Master").Cells(1, 1).Select
End Sub
Thanks for the help...