+ Reply to Thread
Results 1 to 4 of 4

Pop-up message in case value becomes true

Hybrid View

  1. #1
    Registered User
    Join Date
    04-05-2010
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    2

    Pop-up message in case value becomes true

    Hi there,

    I have some VBA programming which I'm not able to figure out myself. Hope you can help me here!

    I have an excel spreadsheet in which stock data is uploaded from the net and refreshed every minute. It's a single spreadsheet and named "Stock data".

    In column "J" the course change for each share that day is mentioned in %. If a value in column "J" becomes greater then 5% or lower then -5% I would like to get an automtic message/pop-up. The message should only come-up once and dissappear after having pressed an acknowledge button.

    In column "A" the name of each share is mentioned. The message that pops-up for, for instance the case that a specific share has reached the specified increase level should be something like "(share name) has reached specified increase level", of course for a decrease it should be the opposite.

    The pop-up should be visible on screen even if excel is not the program running as the active window at that time. (so I'm not missing any of the action when busy with other work )
    Is this possible? Any help is greatly apreciated!

  2. #2
    Registered User
    Join Date
    03-28-2010
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Pop-up message in case value becomes true

    Hey Gebruiker01

    This should get you what you want:

    LastStock = Range("A1000000").End(xlUp).Row
    
    For Each cell In Range("J1:J" & LastStock)
    If cell.Value >= 0.05 Then
         AppActivate "Microsoft Excel"
        MsgBox Range("A" & cell.Row).Value & " has met your specified increase level.", vbSystemModal
    End If
    If cell.Value <= -0.05 Then
         AppActivate "Microsoft Excel"
        MsgBox Range("A" & cell.Row).Value & " has met your specified decrease level.", vbSystemModal
    End If
    Next cell
    Just let us know if you have any problems or questions.
    Warm regards,

    Shampoo Monkey

    If you are happy with the results, please add to my reputation by clicking the icon next to the Post # in the bar above this post.

  3. #3
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Pop-up message in case value becomes true

    A different way of doing things.
    Attached Files Attached Files


    click on the * Add Reputation if this was useful or entertaining.

  4. #4
    Registered User
    Join Date
    04-05-2010
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Pop-up message in case value becomes true

    Thanks for the quick reply Shampoo Monkey,

    I put the code you have made in a new module, but very little happens... I can't even run it as a macro... what am I doing wrong?

+ 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