Results 1 to 6 of 6

handling blank input box

Threaded View

  1. #1
    Registered User
    Join Date
    12-23-2008
    Location
    USA
    Posts
    60

    handling blank input box

    If I do this:
    salesgoal = Application.InputBox("What is the sales goal for the month?", Title:="Holidays", Type:=1)
    If the user clicks "OK" without entering anything, it produces an error. I tried handling it with
    If salesgoal = vbNullString Then
        Exit Sub
    End If
    but it doesn't get there, excel throws an error before it runs that "if null" line.

    Is there a way to fix this?

    Thanks,
    Dave
    Last edited by daviddoria; 12-27-2008 at 09:55 PM. Reason: fixed code tags

Thread Information

Users Browsing this Thread

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

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