Results 1 to 26 of 26

Code Clean-Up: Delete "False" worksheet created when "Cancel" is chosen in Input Box

Threaded View

Kenny Blackwell Code Clean-Up: Delete "False"... 08-27-2015, 09:39 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 10:32 AM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 10:36 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 10:45 AM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 10:52 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 11:09 AM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 11:17 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 11:41 AM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 12:00 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 12:40 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 01:13 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 01:49 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 02:01 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 02:15 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 02:33 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 03:28 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 03:33 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 03:37 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 03:51 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-27-2015, 03:55 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 04:33 PM
gmr4evr1 Re: Code Clean-Up: Delete... 08-27-2015, 06:46 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-28-2015, 08:06 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-28-2015, 02:35 PM
Kenny Blackwell Re: Code Clean-Up: Delete... 08-31-2015, 07:37 AM
gmr4evr1 Re: Code Clean-Up: Delete... 08-31-2015, 10:00 AM
  1. #1
    Registered User
    Join Date
    03-30-2015
    Location
    Charlotte, NC
    MS-Off Ver
    2013
    Posts
    27

    Code Clean-Up: Delete "False" worksheet created when "Cancel" is chosen in Input Box

    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]
    Last edited by Kenny Blackwell; 08-27-2015 at 10:46 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Requiring input by user to be either "Economy", "Business" or "Club"
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2014, 08:57 PM
  2. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  3. Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)" not working
    By redders in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2011, 03:52 PM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. How do I stop a Macro after "Cancel" is chosen in an input box?
    By c991257 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-10-2007, 02:27 PM
  6. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  7. [SOLVED] IF(VLOOKUP("MYDATA", MYNAME, 4) = 0, "TRUE", "FALSE")
    By Souris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 01:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1