I have a form Form1 that I use to display some records, this form has 2 buttons: button1 and button2
Button1 is used to open Form2. Form2 has a button: btnSave
When I click the btnSave button on Form2 it does some things and I want it to click button2 from Form1.
Unfortunately, the code I'm using doesn't click the button2 on Form1.
Here is the code for button1 on Form1:
Private Sub button1_Click(sender As Object, e As EventArgs) Handles button1.Click
Dim frm As New Form2
Here is the code for button2 on Form2:
Public Sub button2_Click(sender As Object, e As EventArgs) Handles button2.Click
DataGridView1.DataSource = GetDataTable_WB()
Here's the code for btnSave on Form2:
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
I also tried:
But nothing happens. It doesn't run the code for button2 on Form1
Thank you in advance!