Forum Discussion

icar1udm211990's avatar
icar1udm211990
Copper Contributor
Nov 28, 2021

Operator & in VBA badfunction

The operator & have problems with strings.  Look at the macro: Sub test( wsimple): wsimple = "T" & "W": End sub.

The result of the variable simple must be "TW" but the result was nothing.

¿ May you reproduce the problem ? ¿ Is a real problem ? Probably, I know how to avoid it, but what is it happening ?. It normaly works.

1 Reply

  • Christian_Hould's avatar
    Christian_Hould
    Copper Contributor
    It work very well on my VBA Excel !

    Private Sub Tempo()
    Dim A As String
    A = "T" & "W"
    Debug.Print A
    End Sub

Resources