+ Reply to Thread
Results 1 to 4 of 4

Getting a range of cells to trigger a pop up box?

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    Wales
    MS-Off Ver
    2013
    Posts
    2

    Red face Getting a range of cells to trigger a pop up box?

    Hi all,

    I am very new to Excel Programming. I am trying to get the cells B2:B10, C2:C10, D2:D10 and E2:E10 to create a pop up message when a cell reaches/exceeds 100%.

    I have managed to do this for one cell:

    Private Sub Worksheet_Calculate()

    If Sheets("Total Percentages").Range("B2").Value > 0.99 Then

    MsgBox "Over 100%!", vbOKOnly

    End If

    End Sub

    But whenever I try and set it to a range it won't work (Error 13 has appeared)? What do I need to do to set it to a range of cells?

  2. #2
    Forum Contributor
    Join Date
    05-27-2014
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    2007 & 2010
    Posts
    273

    Re: Getting a range of cells to trigger a pop up box?

    Try using the worksheet_change event because worksheet_calculate doesn't provide a target address that can be tested.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    Wales
    MS-Off Ver
    2013
    Posts
    2

    Re: Getting a range of cells to trigger a pop up box?

    Lovely, thanks!

  4. #4
    Forum Contributor
    Join Date
    05-27-2014
    Location
    Belfast, Northern Ireland
    MS-Off Ver
    2007 & 2010
    Posts
    273

    Re: Getting a range of cells to trigger a pop up box?

    My pleasure. If it works for you will you mark the thread as solved. Cheers.

+ 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. Adjust a code from cell range trigger to button trigger
    By ld2x07 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-01-2014, 10:02 AM
  2. [SOLVED] Cannot trigger macro with Worksheet_Change(ByVal Target As Range)
    By Leo2004a in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-13-2013, 03:01 PM
  3. Worksheet_Change(ByVal Target As Range) does not trigger macro
    By Jay1357 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-18-2013, 06:17 AM
  4. How to trigger a macro from range not on active sheet
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-10-2010, 06:02 PM
  5. creating a date range trigger
    By gazzo in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-06-2007, 07:00 PM

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