有没有办法在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"