View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
crazybass2 crazybass2 is offline
external usenet poster
 
Posts: 167
Default IF function message too big for cell - automate reply?

Colin,

Set your if statement true value to "TRUE" (ie. B34 is =if('your condition',
TRUE, 'false value'). Then add the following to the sheet code:

Private Sub Worksheet_Calculate()
If Range("B34").Value Then MsgBox ("Put Your Message Here")
End Sub

To add code to the sheet, right click the sheet tab and click "view code"
Paste the code above into the VBA window that opens.

Mike
"Colinhp" wrote:

I have an IF function that if TRUE returns user information text too large
for the nominated cell B34. How can I have a user information message box
appear with this text in it if the IF function returns TRUE?
Or is there another way of generating this user message when the IF function
returns TRUE?
I do not think I can use Data Validation as the nominated cell is not
selected by the user and holds the IF function based on data in other cells.