ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   msgbox to display a cell value, HOW, If possible? (https://www.excelbanter.com/excel-programming/376619-msgbox-display-cell-value-how-if-possible.html)

Corey

msgbox to display a cell value, HOW, If possible?
 
I have a msgbox alert that say's something like:

msgbox "Cell A1 displays XXXX "

I want the XXXX to be whatever the value is in cell A1.

Is this possible??

Regards

Corey



NickHK

msgbox to display a cell value, HOW, If possible?
 
Corey,
Dim MyRange as range

set MyRange=Range("A1")

msgbox "Cell " & MyRange.address(false,false) & " displays " & MyRange.Text

You now know the difference between .Value and .Text, but as the msgbox text
says "displays", I assume .Text.

NickHK

"Corey" wrote in message
...
I have a msgbox alert that say's something like:

msgbox "Cell A1 displays XXXX "

I want the XXXX to be whatever the value is in cell A1.

Is this possible??

Regards

Corey





Corey

msgbox to display a cell value, HOW, If possible?
 
thanks again

--
Regards

Corey




All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com