+ Reply to Thread
Results 1 to 4 of 4

If inputbox = false then repeat inputbox

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    If inputbox = false then repeat inputbox

    Good day everyone,
    I have the following code:

    Please Login or Register  to view this content.
    I need to add something that if user doesnt add a number (code in place) then it will clear the active cell but also bring it back to the inputbox application.

    So lets say a user inserts a letter it will give the message "Sorry, only numbers allowed." with an OK button...(Already there) but then will go back to the "NumberOfContracts" inputbox.

    I had something yesterday but lost it, something with repeat: and goto repeat but now I'm lost in where to add it.

    Please help, Thank you

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: If inputbox = false then repeat inputbox

    I had this and it was working great without the

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    But I need to have the If B5:B30 then

    Why that now it's not working but when I change the, If Not Intersect(Target, Range("A5:A30")) Is Nothing Then, it doesn work?

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: If inputbox = false then repeat inputbox

    Here is some simple logic to demand a number:

    Please Login or Register  to view this content.
    Gary's Student

  4. #4
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: If inputbox = false then repeat inputbox

    I tweeked my code to the following and works well but thank you Jakob

    Please Login or Register  to view this content.
    Excelnoub

+ Reply to Thread

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