本文介绍了如何解决索引超出了vb中数组的界限,见下面的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
读取阅读按钮的信息
Read in information for Read button
Private Sub btnRead_Click(sender As Object, e As EventArgs) Handles btnRead.Click
Dim F As Integer
Dim P As Integer
For F = 1 To NumFarmers
MarsFarmers(F).Name = InputBox("Please enter farmer name" & CStr(F))
MarsFarmers(F).Workers = CInt(InputBox("Please enter number of workers" & CStr(F)))
For P = 1 To NumPeriods
MarsFarmers(F).Profit(P) = CInt(InputBox("Please enter profit of farmer" & CStr(F)))
Next P
Next F
End Sub
推荐答案
这篇关于如何解决索引超出了vb中数组的界限,见下面的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!