+ Reply to Thread
Results 1 to 5 of 5

Pop up message box not working!

  1. #1
    Registered User
    Join Date
    12-01-2014
    Location
    sydney, australia
    MS-Off Ver
    365
    Posts
    3

    Pop up message box not working!

    Hello I'm trying to create pop up message that would come on if any part of the sheet "ANZ Purchase Requisition V2.6" has statement "MUST SUBMIT SAMPLE eNPI"
    It worked and then it stopped working when I moved it to a new tab. of course I changed the tab name... Is it the range?
    I have no idea I'm quite new to VBA coding.
    please help!

    Private Sub Worksheet_Change(ByVal Target As Range)

    Set oWs = Worksheets("ANZ Purchase Requisition V2.6")
    Set oRngCheck = Range("B2", Range("HO200").End(xlUp))

    Application.EnableEvents = False
    For Each oCl In oRngCheck
    If InStr(oCl, "MUST SUBMIT SAMPLE eNPI") > 0 Then
    MsgBox "Please submit SAMPLE eNPI for proper Corporate Regulatory Assessment ", vbCritical, "Flagged for Illegal Logging Law Regulatory Assessment"
    oCl.Select
    Exit Sub
    End If
    Next oCl
    Application.EnableEvents = True


    End Sub

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Pop up message box not working!

    Which worksheet is the code in?

    Has the code errored at any point before it stopped working?

    PS Can you add code tags when posting code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-01-2014
    Location
    sydney, australia
    MS-Off Ver
    365
    Posts
    3

    Re: Pop up message box not working!

    Thank you for the reply,
    The code is in the sheet "ANZ Purchase Requisition V2.6"
    Correct sheet.

    I can add other things, there's no errors it just simply doesn't do anything.
    is there anything wrong with my code?

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Pop up message box not working!

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  5. #5
    Registered User
    Join Date
    12-01-2014
    Location
    sydney, australia
    MS-Off Ver
    365
    Posts
    3

    Re: Pop up message box not working!

    Hello~

    Yep attached.
    So Row A if entered 4414, Row B should come up with a statement in red, which then should flag the message box to pop up.
    It was working in other sheet I'm so lost!!!

    Thank you
    Attached Files Attached Files

+ 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. Message box option buttons not working....
    By abordeau in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2014, 11:12 AM
  2. #VALUE! message for working formula
    By Consty1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2012, 04:18 PM
  3. #VALUE! message for working formula
    By Consty1 in forum Excel General
    Replies: 7
    Last Post: 11-05-2012, 12:31 PM
  4. Message box macro not working
    By scottwhittaker2333 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-13-2010, 03:35 PM
  5. [SOLVED] Add Message While Program is Working
    By maperalia in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-21-2006, 11:16 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