Valua of a cel as message in a MsgBox

  • Thread starter Thread starter Reijer
  • Start date Start date
R

Reijer

Hello Excellers,

How can i assign a valua (text) that is in cel B2 of an active sheet to a
part of the message of a MsgBox ?

Thanks for your attention,
Greetz Reijer.
 
Sub textinmsgbox()
MsgBox "start of msg " & Range("k1") & " end of msg"

End Sub
 
Sub test()
dim myval as string
myval = Range("B2").Value 'or .Text
MsgBox "The value is " & myval
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top