I have code that creates a new sheet in the active workbook and requires input to name the sheet. My problem is that I also need to create a button on sheet1 that opens the newly created sheet and names the button the same as the sheet name.
This is my code for creating the new sheet that works fine.
Sub New_Contractor()
'
' New_Contractor Macro
'Creates a new sheet for a new contractor and names the sheet tab.
'
Sheet16.Visible = True
Sheet16.Select
Cells.Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Paste
ActiveSheet.Name = InputBox("Please enter the name of the New Contractor")
Range("F4").Select
ActiveWindow.FreezePanes = True
Range("b4").Select
Sheet16.Visible = False
End Sub
Can anyone help me?
Bookmarks