#1
|
|||
|
|||
Concatenate two textbox values for message box
I was wondering if anybody knows how to concatenate the output from two textboxes for use in a message box? Below is the code i have and i want to display Lookup for (Value of Textbox 1 and Value of Textbox 2) not found. I thought and ampersand would do the trick but it comes up with an error MsgBox "Lookup for " & TextBox1.Text Textbox2.Text " not found" Any suggestions appreciated Regards Colin |
#2
|
||||
|
||||
You need to add ampersands between each element (and presumably the 'and' between the text box values).
Code:
MsgBox "Lookup for " & TextBox1.Text & " and " & TextBox2.Text & " not found"
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Concatenate function for displaying numbers in words | officeboy09 | Excel | 13 | 08-09-2021 12:59 PM |
Display result in textbox based on the input of another textbox | scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |
Open new message in outlook using values from a word document | mattbennion | Word VBA | 1 | 12-21-2011 07:23 PM |
If, move and concatenate in VBA | devcon | Excel Programming | 0 | 07-04-2011 12:44 AM |
Concatenate/merge contents of multiple cells | PSYloco | Excel | 2 | 05-14-2011 03:46 PM |