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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert name of the caption into the message box 1

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG
How could I parse the name of the caption to the message box ? For example, if the caption of the control is Paris, I would like to insert the caption in the message box and the message there to read “There are problems with the warehouse in Paris”

Me!Command7.Caption = "Paris"
MsgBox "There are problems with the warehouse in …… !", vbOKOnly, "Warning"
 
Code:
Me!Command7.Caption = "Paris"
MsgBox "There are problems with the warehouse in " &  Me!Command7.Caption &  " !", vbOKOnly, "Warning"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top