I am new and I need help!
I am trying to pass a variable between forms. To make it simple. Imagine 2 forms, Main and form101.
On the main form I click on view code and add the following variable.
Public Class MainForm
'*******************************************************************************
Public aerotest As String = "works"
On form2 I have a text box with the following code.
Public Class Form101
Private Sub Form101_Load(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox1.Text = aerotest
End Sub
I expected the defining of the variable in the Main form would allow me to use it on Form101 but I get an alarm.
Error BC30451 'aerotest' is not declared. It may be inaccessible due to its protection level.
Any help would be greatly appreciated.
Thanks,
Dave