Results 1 to 11 of 11

If cell above value popup window

Threaded View

  1. #1
    Registered User
    Join Date
    03-20-2010
    Location
    Portugal
    MS-Off Ver
    Excel 2019
    Posts
    69

    If cell above value popup window

    Hi ppl, i have this code, that when for example the cell U50 in Sheet1 is above the number difined in Sheet2 cell P15 it pops up a window saying that is above limit, it works well in an workbook but now i want to do the same to another workbook but i dont remember how does the "Val2" receives the value from Sheet1 U50 to test it, and do some code needs to be inside a function like a Private Sub Worksheet_Change(ByVal Target As Range) ?

    Can anyone help me to refresh my memory? Thanks


    Public Function MaximumExcededCPT2(Val2) As Boolean
        
        Dim MaxCompt2Weight As Range
        Set MaxCompt2Weight = Sheet2.Range("P15")
        
        If Val2 > MaxCompt2Weight Then
            MsgBox "Maximum Weight for compartment 2 is " & MaxCompt2Weight
            MaximumExcededCPT2 = True
        End If
        
    End Function
    Last edited by Blue_Wings; 11-28-2011 at 12:34 AM.

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