VB6自定义隐式字符串转换

时间:2014-02-10 14:41:29

标签: vb6

有没有办法在VB6中为自定义类提供隐式字符串转换?我发现的所有材料都说不可能。但它以某种方式适用于Excel对象Range

    Dim r As Range
    Set r = Worksheets("test").Range("A1")
    Dim s1 As String
    s1 = r.Address      ' "$A$1"
    Dim s2 As String
    s2 = r.Value        ' "test"
    Dim s3 As String
    s3 = r              ' "test"

0 个答案:

没有答案