It's a lot of code, but this is the gist of it.
In Form1 I have:
... and that's fine.Code:Imports WindowsApplication1.FileStuff Public Class bTest Dim Curves As New List(Of stcCurve) Dim Bias As New stcCurve Dim Temp As New stcCurve Dim Power As New stcCurve Dim BiasPoints = New PointPairList() Dim PowerPoints = New PointPairList() ....... Public Sub SetUpCurves() Bias.CurveColor = Color.AliceBlue Bias.CurveName = "Bias Current" Bias.CurveSymbol = SymbolType.Circle Bias.CurvePoints = BiasPoints Curves.Add(Bias) Power.CurveColor = Color.AliceBlue Power.CurveName = "Power Dissipation" Power.CurveSymbol = SymbolType.Circle Power.CurvePoints = PowerPoints Curves.Add(Power) Temp.CurveColor = Color.AliceBlue Temp.CurveName = "Power Dissipation" Temp.CurveSymbol = SymbolType.Circle Temp.CurvePoints = PowerPoints Curves.Add(Temp) End Sub ..... Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'set up the graph 'set curve attributes Call SetUpCurves() For Each myCurve As stcCurve In Curves MessageBox.Show(myCurve.CurveName) Next End Sub End Class
Then in another module I have:
The error message is:Code:Imports WindowsApplication1.bTest Public Class FileCSV ...... Public Sub EnableCheckBox(ByVal CurveName As String) Select Case CurveName Case bTest.Bias.CurveName 'this gives the error message bTest.cbxRefIb.Enabled = True bTest.cbxRefIb.Checked = False Case bTest.Power.CurveName 'this gives the error message bTest.cbxRefPc.Enabled = True bTest.cbxRefPc.Checked = False Case bTest.Temp.CurveName 'this gives the error message bTest.cbxRefTc.Enabled = True bTest.cbxRefTc.Checked = False End Select End Sub End Class
Error 2 'WindowsApplication1.bTest.Bias' is not accessible in this context because it is 'Private'.




Reply With Quote