M
MichaelRobert
I am writing a macro that will look at the contents of cell b3, which is
populated from another worksheet. This second worksheet returns to b3 a Part
Number if one exists, or #N/A if no Part Number exists.
I want my macro to look at b3. If it sees "#N/A", I want to launch a Message
Box that if clicked will generate a Part Number. I am OK on the message box,
but I am unable to construct the needed IF function without generating
compile errors. Her is what I have currently:
Sub ClickHere()
If Range("b3") = "#N/A" Then MsgBox "OK"
End Sub
[The "OK" in the MsgBox is my placeholder for more code ...]
Any solutions please?
Thanks.
Mike
populated from another worksheet. This second worksheet returns to b3 a Part
Number if one exists, or #N/A if no Part Number exists.
I want my macro to look at b3. If it sees "#N/A", I want to launch a Message
Box that if clicked will generate a Part Number. I am OK on the message box,
but I am unable to construct the needed IF function without generating
compile errors. Her is what I have currently:
Sub ClickHere()
If Range("b3") = "#N/A" Then MsgBox "OK"
End Sub
[The "OK" in the MsgBox is my placeholder for more code ...]
Any solutions please?
Thanks.
Mike