This is a VB.NET question. I would like to modularize code. I have a form with many "tab pages". Each tab page has many controls. I want to separate "code" of each tab in a separate file (.VB file for each tab).
For example, Form1 has tab1 and tab2.
tab1 has a textbox1 and textbox2
tabe2 has datagrid1 and datagrid2.
I would like to separate the code of each tab. Ideally, I would like to create "tab1.vb" (any file name) which populaties data for textbox1, textbox2.
Similarly, tab2.vb will have code for popualting the data grids.
Is there any way to modularize the code? The moment I refer a control name (textbox1) in "tab1.vb", it says the variable is undeclared. I tried putting Form1.textbox1 also. It didn't work.