I have looked at some similar postings on this topic but cant seem to get this working.
I have a FormA and FormB
The Textboxes and labels I wish to clear are on FormA.
On FormA I have this Public Sub.
Public Sub ClearForm()
MsgBox("FormB has closed")
TXT_OrderNo.Text = String.Empty
LBL_CustName.Text = String.Empty
LBL_PartName.Text = String.Empty
LBL_QtyPartsManufactured.Text = String.Empty
LBL_QtyPartsOrdered.Text = String.Empty
LBL_DeliveryDate.Text = String.Empty
LBL_TotalCycleHrs.Text = String.Empty
LBL_CurrentTime.Text = String.Empty
LBL_CustID.Text = String.Empty
LBL_PartID.Text = String.Empty
LBL_CountMach.Text = String.Empty
LBL_PurchaseOrderID.Text = String.Empty
And on a click event of a button on FormB calls FormA ClearForm()
Private Sub BTN_Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_Login.Click
Dim FormA As New FormA
It will display the test msgbox that I have at the Start of ClearForm() but textboxes and labels are still populated. I have also used TXT_OrderNo.text = "".