Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Easy Question: Cell Value

I've programmed vba in access before but not Excel. I simply want to create
a msgbox that shows the value of a cell.

Example

sheet1:

A B C
1 Value No No
2 No No No

code:

msgbox A1

does not return the referenced value. Just blank (triggering off a command
button).

Sorry for such a nobb question....But thanks!

Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Easy Question: Cell Value

On Feb 7, 10:46*am, Robert_DubYa
wrote:
I've programmed vba in access before but not Excel. *I simply want to create
a msgbox that shows the value of a cell.

Example

sheet1:

* * * * * A * * * * *B * * * * *C
1 * * Value * * * No * * * *No
2 * * * *No * * * *No * * * *No

code:

msgbox A1

does not return the referenced value. *Just blank (triggering off a command
button).

Sorry for such a nobb question....But thanks!

Robert


MsgBox Sheets("Sheet1").Range("A1")
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Easy Question: Cell Value

msgbox activeworkbook.worksheets("sheet99").range("a1").v alue
or
msgbox activesheet.range("x99").text 'if it's formatted nicely.



Robert_DubYa wrote:

I've programmed vba in access before but not Excel. I simply want to create
a msgbox that shows the value of a cell.

Example

sheet1:

A B C
1 Value No No
2 No No No

code:

msgbox A1

does not return the referenced value. Just blank (triggering off a command
button).

Sorry for such a nobb question....But thanks!

Robert


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Easy Question: Cell Value

If the cell you want the msgbox to display is the activecell then maybe:

msgbox activecell.value

--
JB


"Robert_DubYa" wrote:

I've programmed vba in access before but not Excel. I simply want to create
a msgbox that shows the value of a cell.

Example

sheet1:

A B C
1 Value No No
2 No No No

code:

msgbox A1

does not return the referenced value. Just blank (triggering off a command
button).

Sorry for such a nobb question....But thanks!

Robert

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
Copy/Paste cell down to next value- Easy question, can't figure it J. Catz. Excel Discussion (Misc queries) 2 November 4th 09 10:45 AM
An easy question filo666 Excel Programming 3 November 5th 07 04:15 PM
EASY QUESTION: Formula to add filename to cell Chip Pearson Excel Programming 0 January 20th 07 01:49 AM
Easy question - If ...then Change cell value Mike R. Excel Programming 3 July 30th 05 04:50 AM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM


All times are GMT +1. The time now is 05:26 AM.

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"