Sunday, August 2, 2009

How do I enter a value of a cell in an inputbox prompt in Visual Basic?

Example:


Let's say that cell A1 has a value of 80 in it.


How do I write the code for the prompt in an inputbox to comeout like:


"You have 80 cookies"


where the value 80 is a variable and it depends on the value on the cell A1.

How do I enter a value of a cell in an inputbox prompt in Visual Basic?
Try this:


Range("a1").Select


c_value = Trim(ActiveCell.Value)


msgbox ("You have " %26amp; c_value %26amp; " cookies")
Reply:yellow_taxi Is this you? … :)!


http://www.osoq.com/funstuff/extra/extra...


No comments:

Post a Comment