+ Reply to Thread
Results 1 to 5 of 5

if inputbox is emtpy , and 'enter' is presed, then exit

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    if inputbox is emtpy , and 'enter' is presed, then exit

    I have the below code on a userform, when I pressed enter (if inputbox 'squaretotal' is empty, then it bring out the debugger.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: if inputbox is emtpy , and 'enter' is presed, then exit

    ?
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: if inputbox is emtpy , and 'enter' is presed, then exit

    I tried that but may be its not that part of the code, i have attached a sample workbook and in this line is where the debugger comes highlighted:

    Please Login or Register  to view this content.
    everything else works fine, its just when pressing "Enter" and the inputbox 'SquareTotal' if its empty it bring out the debugger, and i just want it to exit userform or messagebox only if its emtpy.
    Attached Files Attached Files
    Last edited by chubbychub; 04-28-2023 at 07:17 PM.

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: if inputbox is emtpy , and 'enter' is presed, then exit

    What exactly is the problem described in this topic ?

  5. #5
    Forum Contributor
    Join Date
    10-24-2012
    Location
    San Diego, USA
    MS-Off Ver
    Excel 2019
    Posts
    844

    Re: if inputbox is emtpy , and 'enter' is presed, then exit

    if inputbox 'SquareTotal' is empty, and 'enter' is pressed, it gives error (bring out the debugger)
    i want it to if value is empty, and enter is press, to give out a messagebox

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Exit Sub When Cancel for 1 * InputBox
    By angusfire in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-09-2020, 11:49 AM
  2. [SOLVED] Exit Sub When Cancel on InputBox
    By Linkonem in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-19-2017, 02:49 PM
  3. inputbox exit is blank
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-19-2017, 04:11 PM
  4. [SOLVED] Vba to exit sub on cancel on inputbox
    By alkiviadi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2016, 12:17 PM
  5. [SOLVED] Exit Sub on InputBox Cancel
    By qwerty7 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-01-2015, 07:33 PM
  6. Use Inputbox value to exit sub problem
    By HOT97ECLIPSEGSX in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-21-2010, 04:50 PM
  7. Clean Exit from InputBox
    By scantor145 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2006, 08:55 AM

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