Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBA String concatenation

Tags:

string

vba

Is there any Java-like solution for concatenatin strings in VBA?

I want to use a MsgBox in a way like this:

...
Set UT = Workbooks(dropdownValue).Worksheets(1)
With UT
       UT_rows = .Cells(3, 15).End(xlDown).Row
End With
MsgBox "Rows of the file: " + UT_rows

But when I do that, my code hangs up at this point. (incompatible Types)

like image 238
poeschlorn Avatar asked Dec 22 '22 01:12

poeschlorn


1 Answers

You should always use & when concatenating;

MsgBox "Rows of the file: " & UT_rows
like image 91
Alex K. Avatar answered Jan 02 '23 01:01

Alex K.