Private Type TA a As Double b As Integer End Type Function OutPutTA(a As TA) OutPutTA = a.a & "," & a.b End Function Sub TT() Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim ts As Object Set ts = fso.OpenTextFile("c:\1.txt", ForAppending, True) Dim a As TA a.a = 1
ts.WriteLine OutPutTA(a) End Sub
Private Type TA a As Double b As Integer End Type function OutPutTA(a As TA) OutPutTA = a.a & "," & a.b End Function Sub TT() Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim ts As Object Set ts = fso.OpenTextFile("c:\1.txt", ForAppending, True)
~~~~~~~~~~~~~~~~~~无效的过程或函数调用 Dim a As TA a.a = 1
ts.WriteLine OutPutTA(a) End Sub