Results 1 to 4 of 4

If Cell Value = Error, show MsgBox

Threaded View

  1. #1
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    If Cell Value = Error, show MsgBox

    Hi there,

    I hope you are all well.

    I need your help on a bit of a code I have.

    I have a cell (on this case "Z18") that have a Vlookup formula. I want a MsgBox to show, if the value of the cell is Error only. This means that the value is not maintained on the Vlookup range.

    I don't know the reference for Error. What I have is the following:

    Private Sub Worksheet_Calculate()
    
    If Range("Z18").Value = ERROR Then
    End If
    If MsgBox("Reference not found! Do you want to add it to database?", vbYesNo + vbQuestion, "Update file to Management") = vbNo Then End
    UserForm1.Show
    End If
    So, in a nutshell, I want a MsgBox only if the value of the cell "Z18" is "#N/A".

    The UserForm1 will open if users clicks "Yes" to add the reference to database.

    Any ideas?

    Your assistance will be highly appreciated.

    Best regards,
    Filipe Oliveira.
    Last edited by pipoliveira; 05-08-2013 at 04:55 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