PDA

View Full Version : display range value in message box



RoadDog83
09-29-2009, 12:41 PM
i want to be able to select multple cells and run a macro that will display there values in a message box. seems pretty simple but i cant figure it out!

can anyone help me?

thanks

Bob Phillips
09-29-2009, 01:07 PM
ALl their values? Concatenated? Comma separated?

RoadDog83
09-29-2009, 01:11 PM
not sure,

what i really want to do is make a selection and display the values in the same user form i use to populate the cells in the first place.

basically i want to be able to edit any information in a specific row

like updating a persons name or address

georgiboy
09-29-2009, 01:30 PM
From what you had in your first post this is what i might have put forward...
Sub DisplayValue()
Dim rCell As Range, MsgBoxString As String

For Each rCell In Selection.Cells
MsgBoxString = MsgBoxString & rCell.Address & " = " & rCell.Value & vbNewLine
Next rCell

MsgBox MsgBoxString

End Sub
but it sounds like you are after something different, thought i would submit it anyway.

Bob Phillips
09-29-2009, 01:54 PM
Still not sure.

Do you want to select the row and automatically fire the form, or button driven, or what?

georgiboy
09-30-2009, 10:17 AM
Here is something to play with, see if you can find what you need.

There is probably a thousand ways you could do this, but this might get the ball rolling and help us find out what you actually require.

Hope this helps.