Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Popup Window

Can someone please tell me how to create a macro that, when run, displays
the value of a particular cell?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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?





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup window on open kraway Excel Discussion (Misc queries) 1 January 12th 07 03:19 PM
Formatted popup window DoctorG Excel Programming 3 July 28th 06 02:49 PM
Popup window (plz replay) sd Excel Programming 2 August 28th 03 04:45 AM
popup message window Tom Ogilvy Excel Programming 0 August 26th 03 01:02 PM
Popup message window with name shah[_2_] Excel Programming 2 August 26th 03 02:40 AM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"