this is the code that i have
Sub New1HShooter()
Sheets("One Handed").Select
tempCol = 2
If Cells(3, tempCol) = "" Then
Sheets("template").Select
Range("B2:B58").Select
Selection.Copy
Sheets("One Handed").Select
Range("B2:B58").Select
ActiveSheet.Paste
Else
While Cells(3, tempCol) <> ""
tempCol = tempCol + 1
Wend
Sheets("template").Select
Range("B2:B58").Select
Selection.Copy
Sheets("One Handed").Select
Cells(2, tempCol).Select
ActiveSheet.Paste
End If
tempName = InputBox("Enter Shooter's Name", "New Shooter Entry")
Cells(3, tempCol) = tempName
Sheets("Extra Scores").Select
Columns("F:I").Select
Selection.Insert Shift:=xlToRight
Columns("B:E").Select
Selection.Copy
Columns("F:I").Select
ActiveSheet.Paste
Cells(4, 7) = tempName
Cells(5, 7) = "1 Handed"
Cells(1, 1).Select
Sheets("Main Menu").Select
Cells(1, 1).Select
End Sub
what happens is that if i do not enter a name in and i hit cancel it gives me a error can somebody help me fix this so it would clear the data from the sheet and take me back to the main page please
i think mabe change the option of the input box where it ask for the name maybe not sure hope somebody can help out
Thanks Al
Sub New1HShooter()
Sheets("One Handed").Select
tempCol = 2
If Cells(3, tempCol) = "" Then
Sheets("template").Select
Range("B2:B58").Select
Selection.Copy
Sheets("One Handed").Select
Range("B2:B58").Select
ActiveSheet.Paste
Else
While Cells(3, tempCol) <> ""
tempCol = tempCol + 1
Wend
Sheets("template").Select
Range("B2:B58").Select
Selection.Copy
Sheets("One Handed").Select
Cells(2, tempCol).Select
ActiveSheet.Paste
End If
tempName = InputBox("Enter Shooter's Name", "New Shooter Entry")
Cells(3, tempCol) = tempName
Sheets("Extra Scores").Select
Columns("F:I").Select
Selection.Insert Shift:=xlToRight
Columns("B:E").Select
Selection.Copy
Columns("F:I").Select
ActiveSheet.Paste
Cells(4, 7) = tempName
Cells(5, 7) = "1 Handed"
Cells(1, 1).Select
Sheets("Main Menu").Select
Cells(1, 1).Select
End Sub
what happens is that if i do not enter a name in and i hit cancel it gives me a error can somebody help me fix this so it would clear the data from the sheet and take me back to the main page please
i think mabe change the option of the input box where it ask for the name maybe not sure hope somebody can help out
Thanks Al