Thread: Newbie, msgbox
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
Posts: 340
Default Newbie, msgbox

Try:

Dim cell As Range
Dim anyS
For Each cell In Range("H2:H8")
If anyS = "" Then
anyS = cell.Value
Else
anyS = anyS & Chr(13) & cell.Value
End If
Next
MsgBox anyS

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Bmj" wrote in message
...
Hi,

I want to display all the values from range H2:H8 in a msgbox, with a
linefeed between the values. How to do this??

Best Regards,
A newbie