Private Sub CommandButton1_Click()
dl = Range("C65000").End(xlUp).Row + 1
Cells(dl, 3) = TextBox1
IniCtl dl
End Sub
Sub IniCtl(dl)
Dim ctl As Control
For Each ctl In Controls
If TypeName(ctl) = "TextBox1" Then ctl = ""
Dim i As Byte
For i = 1 To Sheets.Count
If TextBox1.Value = Sheets(i).Name Then
Sheets("Casting Factory Capability").Select
Exit Sub
End If
Next i
Sheets.Add after:=Sheets(Worksheets.Count)
Sheets(Worksheets.Count).Name = TextBox1.Value
Sheets("Casting Factory Capability").Hyperlinks.Add _
Anchor:=Sheets("Casting Factory Capability").Cells(dl, 3), Address:="", _
SubAddress:=TextBox1.Value & "!A1", TextToDisplay:=TextBox1.Value
Unload Me
Next
End Sub