VB-2010 accessing a public string variable
Upfront, I am quite new to Visual Basic.
My question: How can I "pass" or reference a simple string variable across 2 forms.
I start my main form with:
Public Namevar AsString
Now then, I want to fire up a subform, SubSearch with a button click. So:
PrivateSub SearchRun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchRun.Click
So far so good.
However, I want to use Namevar within SubSearch. Since I initially declared Namevar as Public, I thought it's value would be available in my Subform. But everything I have tried has failed.
Any help will be appreciated.
|All times are GMT +5.5. The time now is 00:37.|