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:
So, in a nutshell, I want a MsgBox only if the value of the cell "Z18" is "#N/A".![]()
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
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.
Bookmarks