I'm new to Visual Basic 3, and I'm working on a program that saves user input, and some information ends up in a list box. I save the text box info with Type...End Type, but I don't know how to save the list box information. <br>
Any help or advice would be appreciated. <br>
<br>
Here's an example of what I have so far: <br>
<br>
(general)<br>
Type Info<br>
<br>
Character As String<br>
Race As String<br>
Class As String<br>
Level As Integer<br>
<br>
End Type<br>
<br>
Sub xSave_Click ()<br>
<br>
Cmdialog1.Action = 2<br>
<br>
Dim File As Info<br>
<br>
File.Character = Character.Text<br>
File.Race = Race.Text<br>
File.Class = Class.Text<br>
File.Level = Level.Caption<br>
<br>
<br>
Open Cmdialog1.Filename For Random As #1<br>
Put #1, 1, File <br>
Close #1 <br>
<br>
End Sub<br>
<br>
Sub xOpen_Click () <br>
<br>
Cmdialog1.Action = 1<br>
Dim File As Info<br>
<br>
Open Cmdialog1.Filename For Random As #1<br>
Get #1, 1, File <br>
Close #1 <br>
<br>
Character.Text = File.Character<br>
Race.Text = File.Race<br>
Class.Text = File.Class<br>
Level.Caption = File.Level<br>
<br>
End Sub<br>
<br>
Any help or advice would be appreciated. <br>
<br>
Here's an example of what I have so far: <br>
<br>
(general)<br>
Type Info<br>
<br>
Character As String<br>
Race As String<br>
Class As String<br>
Level As Integer<br>
<br>
End Type<br>
<br>
Sub xSave_Click ()<br>
<br>
Cmdialog1.Action = 2<br>
<br>
Dim File As Info<br>
<br>
File.Character = Character.Text<br>
File.Race = Race.Text<br>
File.Class = Class.Text<br>
File.Level = Level.Caption<br>
<br>
<br>
Open Cmdialog1.Filename For Random As #1<br>
Put #1, 1, File <br>
Close #1 <br>
<br>
End Sub<br>
<br>
Sub xOpen_Click () <br>
<br>
Cmdialog1.Action = 1<br>
Dim File As Info<br>
<br>
Open Cmdialog1.Filename For Random As #1<br>
Get #1, 1, File <br>
Close #1 <br>
<br>
Character.Text = File.Character<br>
Race.Text = File.Race<br>
Class.Text = File.Class<br>
Level.Caption = File.Level<br>
<br>
End Sub<br>
<br>