VB 如何保存文本框数组控件的内容
有300个文本框数组Text1(0)--Text1(299),想这样子保存起来如下:PrivateSubForm_Load()Fore=0To229Text1(e).Te...
有300个文本框数组Text1(0)--Text1(299),想这样子保存起来如下:
Private Sub Form_Load()
For e = 0 To 229
Text1(e).Text = GetSetting(App.Title, "Text1(e)", "Text", "")
Next
End Sub
Private Sub Command1_Click()'保存
For e = 0 To 9
SaveSetting App.Title, "Text5(e)", "Text", Text5(e).Text
DoEvents
Next
End Sub
但是只存得最后一个Text1(299)文本框的内容,请各位高手指点一下,感激不尽! 展开
Private Sub Form_Load()
For e = 0 To 229
Text1(e).Text = GetSetting(App.Title, "Text1(e)", "Text", "")
Next
End Sub
Private Sub Command1_Click()'保存
For e = 0 To 9
SaveSetting App.Title, "Text5(e)", "Text", Text5(e).Text
DoEvents
Next
End Sub
但是只存得最后一个Text1(299)文本框的内容,请各位高手指点一下,感激不尽! 展开
2个回答
展开全部
Private Sub Form_Load()
For e = 0 To 299
Text1(e).Text = GetSetting(App.Title, "Text1", "Text" & e, "")
doevents
Next
End Sub
Private Sub Command1_Click()'保存
For e = 0 To 299
SaveSetting App.Title, "Text1", "Text" & e, Text1(e).Text
DoEvents
Next
End Sub
For e = 0 To 299
Text1(e).Text = GetSetting(App.Title, "Text1", "Text" & e, "")
doevents
Next
End Sub
Private Sub Command1_Click()'保存
For e = 0 To 299
SaveSetting App.Title, "Text1", "Text" & e, Text1(e).Text
DoEvents
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询