I wonder whether someone may be able to help me pelase.
I'm using the code below to create a 'Pop Up' message upon on a cell value being selected, in this case, the word 'No'.
[vba]
If Target.Column = 2 Then
If Target = "No" Then
MsgBox "Please remember to delete any future resource forecasts"
End If
End If[/vba]
The code works fine, but I would now like to extend this a little further and populate part of the message with a value from the next column.
I've amended this line:
[vba]MsgBox "Please remember to delete any future resource forecasts"[/vba]
to this:
[vba]MsgBox "Please remember to delete any future resource forecasts for " & cell.Offset(0, 1).Value & ""[/vba]
but when I run this, I receive the follwoing error:
and I'm not sure why.Run time error '91': Object variable or With block variable not set
I just wondered whether someone could possibly have a look at this please and let me know where I'm going wrong.
Many thanks and kind regards