I have the following code would like to have the results from the input box to copied to cell B7, however it is not copying the results Can someone help.
Private Sub CommandButton1_Click()
'Sub AddSheetTest()
'Replace "Sheet1" with the name of the sheet to be copied.
Dim i As Integer, x As Integer
Dim shtname As String
Dim shtTemp As Worksheet
ActiveSheet.Unprotect
ActiveWorkbook.Sheets("Template").Copy _
Before:=ActiveWorkbook.Sheets("Summary")
shtname = InputBox("Enter Project Number?", "Sheet name?")
ActiveSheet.Name = shtname
shtTemp.Range("b7").Valve = shtname
ActiveSheet.Shapes("CommandButton1").Delete
ActiveSheet.Protect
End Sub
Private Sub CommandButton1_Click()
'Sub AddSheetTest()
'Replace "Sheet1" with the name of the sheet to be copied.
Dim i As Integer, x As Integer
Dim shtname As String
Dim shtTemp As Worksheet
ActiveSheet.Unprotect
ActiveWorkbook.Sheets("Template").Copy _
Before:=ActiveWorkbook.Sheets("Summary")
shtname = InputBox("Enter Project Number?", "Sheet name?")
ActiveSheet.Name = shtname
shtTemp.Range("b7").Valve = shtname
ActiveSheet.Shapes("CommandButton1").Delete
ActiveSheet.Protect
End Sub