Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable into messagebox text

Status
Not open for further replies.

Octagon6

Programmer
Mar 18, 2003
18
US
How do I get a variable displayed in my messagebox text?
 
Octagon6,

Is this what you want to do:
Code:
MyVariable="Message I want to display"
=messagebox(MyVariable)


Medic
 
What kind of variable is it? In general, you can use transform() or some other to-string conversion function to include it in your MB text. e.g.
Code:
messagebox("The Time is: "+transform(time()))
messagebox("The Date and Time is: "+transform(datetime()))
messagebox("The number ten in a string: "+transform(10))
messagebox("The number ten in a string: "+str(10,2))
messagebox(".T. looks like this: "+transform(.T.))
I just tested these all in VFP 6.0 -> 8.0.

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top