![]() |
Popup Window
Can someone please tell me how to create a macro that, when run, displays
the value of a particular cell? |
Popup Window
In its simplest form, the code would be as follows:
Sub AAA() MsgBox "Value: " & ThisWorkbook.Worksheets("Sheet1").Range("A1").Text End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "RUSS" wrote in message ... Can someone please tell me how to create a macro that, when run, displays the value of a particular cell? |
Popup Window
Thank you, Mr. Pearson - one other question - how would I add a second line
to the msgbox in your example? "Chip Pearson" wrote in message ... In its simplest form, the code would be as follows: Sub AAA() MsgBox "Value: " & ThisWorkbook.Worksheets("Sheet1").Range("A1").Text End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "RUSS" wrote in message ... Can someone please tell me how to create a macro that, when run, displays the value of a particular cell? |
Popup Window
msgbox "Line 1" & vblf & "line2"
is one way. If you share with people who use Mac's: msgbox "Line 1" & vbnewline & "line2" (It'll work on either platform) RUSS wrote: Thank you, Mr. Pearson - one other question - how would I add a second line to the msgbox in your example? "Chip Pearson" wrote in message ... In its simplest form, the code would be as follows: Sub AAA() MsgBox "Value: " & ThisWorkbook.Worksheets("Sheet1").Range("A1").Text End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "RUSS" wrote in message ... Can someone please tell me how to create a macro that, when run, displays the value of a particular cell? -- Dave Peterson |
All times are GMT +1. The time now is 10:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com