Hello All,

I'm trying to add items to a ComboBox at Run-Time. I have the following code in the ClassLibrary;
Code:
Public Class Diameters

    Public Function Diameter(ByRef ComboBox5 As System.Windows.Forms.ComboBox) As String

        ComboBox5.Items.Add("300mm")
        ComboBox5.Items.Add("350mm")
        ComboBox5.Items.Add("400mm")
        ComboBox5.Items.Add("450mm")
        ComboBox5.Items.Add("500mm")
        ComboBox5.Items.Add("560mm")
        ComboBox5.Items.Add("630mm")

    End Function
End Class
and I call this from another Form using;
Code:
        Dim AddDia As String

        AddDia = EconoAxialFan.Diameters.Diameter(ComboBox5)
The problem I have is an error Name 'ComboBox5' is not declared on ComboBox5 in this last piece of code.

Now I have used the same method to call this as I have used in other parts of my program without any problems, so why this should now happen beats me.

Best Rgds,
Tarablue