R RUSS Jun 20, 2007 #1 Can someone please tell me how to create a macro that, when run, displays the value of a particular cell?
Can someone please tell me how to create a macro that, when run, displays the value of a particular cell?
C Chip Pearson Jun 20, 2007 #2 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)
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)
R RUSS Jun 20, 2007 #3 Thank you, Mr. Pearson - one other question - how would I add a second line to the msgbox in your example?
Thank you, Mr. Pearson - one other question - how would I add a second line to the msgbox in your example?
D Dave Peterson Jun 20, 2007 #4 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)
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)