View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Can MsgBox Do This??

Put this in the worksheet code (right-click the particular sheet in VBE and
do view code):

Private Sub Worksheet_Change(ByVal Target As Range)

Dim i As Byte
Dim strMessage As String

Set Target = Range(Cells(2, 6), Cells(7, 6))

For i = 2 To 6
strMessage = strMessage & Cells(i, 6) & vbCrLf
Next

If Not Intersect(ActiveCell, Target) Is Nothing Then
MsgBox strMessage, , ""
End If

End Sub


RBS

"foamfollower" wrote in message
om...
Hello,
Thanks for any help in advance. just when i'm getting ready to
upgrade myself
from pion to junior-grade programmer, i get stumped on an easy
one....probably.

here it is:

I copy a data set to a sheet. on that sheet, i have five cells, F2:F6
that
contain a COUNTIF formula and a TEXT argument that analyze specific
data and
return a value as a number with a text string. example of returned
value: 2 rolls exceeding cv threshold. now, thats simple enough
(even for me)

what i need is a MessageBox that appears immediately after data is
copied to the sheet that tells the operator the results in the cells
F2:F6. and i only have to have the operator click "OK" and end it
there. i can insert text in a
message box all day long, but i can't figure out how to display the
result of
a cell, or in this case, a range of 5 cells.

Thanks once again! any help is greatly appreciated.

LiveLongAndProsper

SF