+ Reply to Thread
Results 1 to 4 of 4

Error message if value is noth within range

  1. #1
    Registered User
    Join Date
    06-26-2014
    Location
    Norway
    MS-Off Ver
    10
    Posts
    43

    Error message if value is noth within range

    Hello,

    I would like to make a macro (Workbook_SheetChange) to display an error message if the value entered is not within a range of 1000000 and 3999999.
    I already have code to display error message if the entered value already exists in the worksheet

    How can I set this up?

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: 2019 but still use also older versions
    Posts
    7,447

    Re: Error message if value is noth within range

    Add another test to the code you already have. The test will be probably (but it depends on the code you already have):
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    06-26-2014
    Location
    Norway
    MS-Off Ver
    10
    Posts
    43

    Re: Error message if value is noth within range

    Adding this gave me an error.

    Below is the code i currently have:

    Please Login or Register  to view this content.
    Where should I add the new code?

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: 2019 but still use also older versions
    Posts
    7,447

    Re: Error message if value is noth within range

    How about adding it at the beginning :

    Please Login or Register  to view this content.
    By the way - why not use just data validation in the spreadsheet?

+ 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. Replies: 0
    Last Post: 07-31-2013, 06:03 AM
  2. [SOLVED] run-time error “9”: message saying that the “subscript is out of range”
    By IaLa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-31-2013, 04:28 AM
  3. [SOLVED] Not getting error message I need, instead getting Out of Range Error (Error 9)
    By welborns2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2013, 09:10 AM
  4. Error Message 'Subscript Out of Range'
    By sbnjac80 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-24-2009, 01:44 PM
  5. out of range error message
    By juergenkemeter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2006, 02:10 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