vb get 函数?

Option Explicit

Private Type record
ID As Integer
name As String * 5
End Type

Public Sub wrong()
MsgBox "发生错误" & vbCrLf & Err.Description, 0 + 16, "错误"
End Sub

Private Sub Form_Click()
On Error GoTo tag1
Dim myrecord As record, position
Open "C:\Users\stoplee\Desktop\新建文本文档 (2).txt" For Random As #1 Len = Len(myrecord)
'Debug.Print Len(myrecord)
position = 1
Get #1, position, myrecord
Print myrecord.name
Close #1
Exit Sub
tag1:
wrong
End Sub

这个例子是书上的 主窗体过程里 那个调试注释是我自己加的 为毛len(myrecord)等于7 ???

墨色风雨
浏览 718回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP