+ Reply to Thread
Results 1 to 3 of 3

VBA Help - If no number in range, then display error.

  1. #1
    Registered User
    Join Date
    06-06-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    VBA Help - If no number in range, then display error.

    Hi guys,
    I'm working on some coding where I can search for a customer order via a UserForm and then it will attach it to Outlook and get ready to send an email, I've managed to program it so that if text or NO number is entered it will prompt the user for a number. However, when I enter an incorrect order ID (like one that doesn't exist) it will attach ALL of the sheet (with all customer data on it).

    I was wondering if it is possible to display an error and say "Enter a valid order number" if the order reference does not exist.

    Any thoughts?

    My code is below:


    Please Login or Register  to view this content.
    Last edited by jammy1812; 11-14-2012 at 09:10 AM.

  2. #2
    Registered User
    Join Date
    06-06-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: VBA Help - If no number in range, then display error.

    I've tried looking for means of validation, but haven't had any luck.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: VBA Help - If no number in range, then display error.

    Try this...

    Please Login or Register  to view this content.

+ 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