vb错误求助:下标越界是怎么一回事啊?
这是产生错误的那段代码,这是一段文件发送的代码.请各位大侠帮忙.PrivateSubcmdSend_Click()WithftSend(MyID).Comment=txt...
这是产生错误的那段代码,这是一段文件发送的代码.请各位大侠帮忙.
Private Sub cmdSend_Click()
With ftSend(MyID)
.Comment = txtComments
.FileSize = CDbl(FileLen(txtFile))
.FileToSend = txtFile
.frmSend.InitTransfer MyID
End With
SendClicked = True
Unload Me
End Sub
部分模块代码:
Public Type T_FILE_TRANSFER_SEND
Comment As String * 200
To As String
FileToSend As String
FileSize As Double
frmChoose As New frmFileChoose
frmSend As New frmSending
End Type
Public ftSend() As T_FILE_TRANSFER_SEND
Dim SendCount As Long
Public Function sendfile(ByVal Destination As String)
ReDim Preserve ftSend(0 To SendCount)
ftSend(SendCount).To = Destination
ftSend(SendCount).frmChoose.ChooseSend SendCount
SendCount = SendCount + 1
End Function 展开
Private Sub cmdSend_Click()
With ftSend(MyID)
.Comment = txtComments
.FileSize = CDbl(FileLen(txtFile))
.FileToSend = txtFile
.frmSend.InitTransfer MyID
End With
SendClicked = True
Unload Me
End Sub
部分模块代码:
Public Type T_FILE_TRANSFER_SEND
Comment As String * 200
To As String
FileToSend As String
FileSize As Double
frmChoose As New frmFileChoose
frmSend As New frmSending
End Type
Public ftSend() As T_FILE_TRANSFER_SEND
Dim SendCount As Long
Public Function sendfile(ByVal Destination As String)
ReDim Preserve ftSend(0 To SendCount)
ftSend(SendCount).To = Destination
ftSend(SendCount).frmChoose.ChooseSend SendCount
SendCount = SendCount + 1
End Function 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询