vb6 - 用vb6连接字符串

我正在尝试在 vb6 中连接。不支持运算符 +=,我想执行类似下面代码的操作。我想在程序处理这段代码时向文本框添加更多字符串。谁能建议将 += 更改为什么?我知道 & 可以在将一个字符串添加到另一个字符串时使用,但它似乎不适合我在这里处理的示例。

谢谢。

    If (strHomeNo <> "") Then
        txtPhoneNums = "Home: " + strHomeNo
    End If
    If (strMobileNo <> "") Then
        txtPhoneNums += "Mobile: " + strMobileNo
    End If
    If (strWorkNo <> "") Then
        txtPhoneNums += "Work: " + strWorkNo
    End If
    If (txtPhoneNums <> "") Then
        txtPhoneNums.ForeColor = vbBlack
        txtPhoneNums.FontBold = False
    End If
Else
     txtPhoneNums.Text = "NO CONTACT DETAILS"
     txtPhoneNums.ForeColor = vbRed
     txtPhoneNums.FontBold = True

最佳答案

会:

txtPhoneNums = txtPhoneNums & "Work: " & strWorkNo

不工作?

https://stackoverflow.com/questions/10688602/

相关文章:

wordpress - 在单个页面上显示 WordPress 博客的所有评论?

django - 重定向到管理员登录

c# - C#中如何从子构造函数调用父构造函数

python - 如何使用 python grep 大文件中两个模式之间的行

ruby-on-rails - 事件管理员 : pass instance variable for

ruby-on-rails - capistrano 错误 : . ..../current: 没有

django - 从 Django 中的一系列 id 中检索匹配对象的列表

php - 将时间戳转换为 .ics iCal 兼容的日期格式

python - 使用python返回参数到命令行

php - 使用 PHP DOM 方法读取 iTunes XML 文件