Now with working with Excel, I am able to save an input (to a cell) and recall it back to the userform when I re-open that Excel project. Now I'm working on a new project that I can take anywhere (without having Microsoft Office loaded on the computer).
Here's what I am trying to accomplish:
I am trying to make an Inventory List for an online game that I play. When I receive new items, I want to add it to the form (manually, via a text box) and update the program to include the new value. When I close and reopen my EXE for my inventory and select the item, I want the updated value to appear in a Label.
Here's the Code for the current project I have: The first Combo Box contains the type of items and the second Combo Box contains the actual Item names. In helping me, you can preserve the list names I have provided for the code.
Expand|Select|Wrap|Line Numbers
- Private Sub Form_Load()
- Combo1.Clear
- Combo2.Clear
- Combo1.AddItem ("Item 1")
- Combo1.AddItem ("item 2")
- Combo1.AddItem ("Item Three")
- Combo1.AddItem ("iTeM IV")
- End Sub
- Private Sub Combo1_Click()
- If Combo1.Text = "Item 1" Then
- Combo2.Clear
- Combo2.AddItem ("Sub-Item 1")
- Combo2.AddItem ("sub-item 2")
- Combo2.AddItem ("sub-item 3")
- Else
- If Combo1.Text = "item 2" Then
- Combo2.Clear
- Combo2.AddItem ("Sub-Item 4")
- Combo2.AddItem ("sub-item 5")
- Combo2.AddItem ("sub-item 6")
- Combo2.AddItem ("Sub-Item 7")
- Combo2.AddItem ("sub-item 8")
- Combo2.AddItem ("sub-item 9")
- End If
- End If
- End Sub
- Private Sub combo2_click()
- If Combo2.Text = "Sub-Item 1" Then
- Text1.Text = 23
- Else
- Text1.Text = ""
- End If
- End Sub