J
Jan Warning
How do I pass an argument from one form to another?
I do the following:
FormA:
dim strFilename as string ="Filename"
dim frmLayout1 as New frmLayout(strFilename)
frmLayout1.Show()
frmLayout:
Private strFilename as string
..
..
Sub New(Filename as string)
..
..strFilename = Filename
..
..
Private Sub frmLayout_Load(...)
dim strLayout as new Filestream(strFilename, FileMode.Open)
At this point I get an error because strFilename is empty (Nothing)
When I step thru the code, I can see that the parm is correctly passed to
and stored by the Sub New
What am I doing wrong?
I do the following:
FormA:
dim strFilename as string ="Filename"
dim frmLayout1 as New frmLayout(strFilename)
frmLayout1.Show()
frmLayout:
Private strFilename as string
..
..
Sub New(Filename as string)
..
..strFilename = Filename
..
..
Private Sub frmLayout_Load(...)
dim strLayout as new Filestream(strFilename, FileMode.Open)
At this point I get an error because strFilename is empty (Nothing)
When I step thru the code, I can see that the parm is correctly passed to
and stored by the Sub New
What am I doing wrong?