Try to split this line:
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=Join(Application.Transpose(valuesArray), ",")
into:
Dim result As String
result = Join(Application.Transpose(valuesArray), ",")
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:=result