Hello all. I'm trying to do a little clean-up on a workbook I created a few months ago with the help of this site. The first issue I hope to resolve is to modify the code to delete the sheet named "False" (or never create it) when someone selects the "Cancel" button in the prompt for adding a new asset. I'll post this section of the code below. It won't let me upload the workbook, as it's just over 5MB - the basic workbook is only 2 sheets and 4 buttons for macros. If there's an easy way to decrease the workbook size, that information would also be appreciated. I could then upload it. Thanks in advance for any help you all might could lend!
['Create new tab - copy "Blank_Form" template
Sub NewTab()
Application.ScreenUpdating = False
Dim sName As String
Dim wks As Worksheet
Sheets("Blank_Form").Visible = True
Worksheets("Blank_Form").Copy After:=Sheets(Worksheets.Count)
Set wks = ActiveSheet
Do While sName <> wks.Name
sName = Application.InputBox _
(Prompt:="Enter Asset Number.")
On Error Resume Next
wks.Name = sName
On Error GoTo 0
Loop
Set wks = Nothing
Sheets("Blank_Form").Visible = xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub]
Bookmarks