hitechoutlaw
Regular
how do i add an item to "ComboBox1" in "Form1" from a class?
Public Sub AddComboItem(ByVal ComboBox as ComboBox, ByVal Item as String)
ComboBox.Items.Add(Item)
End Sub
myFormVariable.ComboBox1.Items.Add("This and That")
myFormVariable = Me
Dim Form1 As Form1
Form1.ComboBox1.Items.Add("United States(Dollar)")
Form1.ComboBox1.Items.Add("Canada(Dollar)")
' Put this in Class1
Public Sub Action1(ByVal ComboBox As ComboBox, ByVal Item As String)
ComboBox.Items.Add(Item)
End Sub
Class fill
Public Shared Sub fillUSCAN()
ComboBox2.Items.Add("United States(Dollar)")
ComboBox2.Items.Add("Canada(Dollar)")
End Sub
End Class