JeremyA1976
Board Regular
- Joined
- Aug 3, 2015
- Messages
- 59
Is there a way to add an item to an active userform by clicking on a label on that userform, which activates a userform to add the item? Yeah, I got a little dizzy explaining that. I have a userform that I have made to add metal drop to our inventory. When we cut a metal sheet down to fabrication blanks, we always have left over (drop) metal that we put in a rack for later use. In order to add the new drop to the inventory, I use this userform to enter Metal type, metal thickness, size and a tracking number. I also added a label near the "Metal Type" label so that when it is clicked, it pops up another userform so i can add a new material type through a submit button.
userform1 is the main "Drop Metal Addition" form
The metal type combobox is named "mt"
label8 is the "*Add a Metal Type" label that shows userform2
textbox1 is the box I use to add the new metal type from userform2 to "mt" combo box in userform1
image1 is the submit button on userform2
I currently have this code to fill out the combo boxes.
Is it possible to add an item to this code through userform2? If so, where would i start?
userform1 is the main "Drop Metal Addition" form
The metal type combobox is named "mt"
label8 is the "*Add a Metal Type" label that shows userform2
textbox1 is the box I use to add the new metal type from userform2 to "mt" combo box in userform1
image1 is the submit button on userform2
I currently have this code to fill out the combo boxes.
Is it possible to add an item to this code through userform2? If so, where would i start?
Code:
Option Explicit
Private Sub Label8_Click()
UserForm2.Show
End Sub
Private Sub UserForm_Initialize()
With mt
.AddItem "Galvanized"
.AddItem "Galv. Paint Grip"
.AddItem "Cold Rolled Steel"
.AddItem "A-36 Hot Rolled"
.AddItem "6061 Aluminum"
.AddItem "5052 Aluminum"
.AddItem "Aluminized"
.AddItem "Checker Plate"
.AddItem "304 Stainless 2b"
.AddItem "304 Stainless [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=4]#4[/URL] Brushed"
.AddItem "304 Stainless [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=8]#8[/URL] Mirrored"
.AddItem "316 Stainless 2b"
.AddItem "316 Stainless [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=4]#4[/URL] Brushed"
.AddItem ""
End With
With MThk
.AddItem "24ga"
.AddItem "22ga"
.AddItem "20ga"
.AddItem "18ga"
.AddItem "16ga"
.AddItem "14ga"
.AddItem "12ga"
.AddItem "11ga"
.AddItem "10ga"
.AddItem "7ga"
.AddItem "-"
.AddItem "1/8 in"
.AddItem "3/16 in"
.AddItem "1/4 in"
.AddItem "5/16 in"
.AddItem "3/8 in"
.AddItem "1/2 in"
.AddItem "5/8 in"
.AddItem "3/4 in"
.AddItem "1 in"
.AddItem "-"
.AddItem ".032 in"
.AddItem ".04 in"
.AddItem ".05 in"
.AddItem ".063 in"
.AddItem ".08 in"
.AddItem ".09 in"
.AddItem ".1 in"
.AddItem ".125 in"
.AddItem ".160 in"
.AddItem ".190 in"
.AddItem ".250 in"
.AddItem ""
End With
End Sub