+ Reply to Thread
Results 1 to 4 of 4

Bring up an error message

  1. #1
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379

    Bring up an error message

    OK, so heres one for you all, I have an indicator cell with conditional formatting, so depending on other conditions it is red, amber or green.

    I also have a button that runs a macro, if you click this button when the cell is red, I need an error message to come up with something like "Insufficient information entered", and then drop out of the macro.

    If the cell is amber when the macro is run, I need a warning message to come up saying "Incomplete information, continue?" and then an option to drop out of the macro back to excel, or continue anyway.

    If the cell is green I need the macro to run as normal.

    Any ideas?

  2. #2
    Duncan
    Guest

    Re: Bring up an error message

    if range("A1").interior.colorindex = 3 then
    'cell is red
    end if

    I havent tested this though........

    Duncan


    ChrisMattock wrote:

    > OK, so heres one for you all, I have an indicator cell with conditional
    > formatting, so depending on other conditions it is red, amber or green.
    >
    >
    > I also have a button that runs a macro, if you click this button when
    > the cell is red, I need an error message to come up with something like
    > "Insufficient information entered", and then drop out of the macro.
    >
    > If the cell is amber when the macro is run, I need a warning message to
    > come up saying "Incomplete information, continue?" and then an option to
    > drop out of the macro back to excel, or continue anyway.
    >
    > If the cell is green I need the macro to run as normal.
    >
    > Any ideas?
    >
    >
    > --
    > ChrisMattock
    > ------------------------------------------------------------------------
    > ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    > View this thread: http://www.excelforum.com/showthread...hreadid=556424



  3. #3
    Duncan
    Guest

    Re: Bring up an error message

    Chris,

    Extremely sorry am I, I didnt pay attention to the conditional
    formatting part of your post, My apologies.

    Best would be to look at:

    http://www.cpearson.com/excel/CFColors.htm

    Duncan


    Duncan wrote:

    > if range("A1").interior.colorindex = 3 then
    > 'cell is red
    > end if
    >
    > I havent tested this though........
    >
    > Duncan
    >
    >
    > ChrisMattock wrote:
    >
    > > OK, so heres one for you all, I have an indicator cell with conditional
    > > formatting, so depending on other conditions it is red, amber or green.
    > >
    > >
    > > I also have a button that runs a macro, if you click this button when
    > > the cell is red, I need an error message to come up with something like
    > > "Insufficient information entered", and then drop out of the macro.
    > >
    > > If the cell is amber when the macro is run, I need a warning message to
    > > come up saying "Incomplete information, continue?" and then an option to
    > > drop out of the macro back to excel, or continue anyway.
    > >
    > > If the cell is green I need the macro to run as normal.
    > >
    > > Any ideas?
    > >
    > >
    > > --
    > > ChrisMattock
    > > ------------------------------------------------------------------------
    > > ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
    > > View this thread: http://www.excelforum.com/showthread...hreadid=556424



  4. #4
    Forum Contributor
    Join Date
    04-27-2006
    Location
    Cayman Islands
    Posts
    379
    Hmmm, think that's a little beyond my limited knowledge of VB! Thanks anyway.

+ 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