Guest waszer Posted November 14, 2002 Posted November 14, 2002 In my main form I have the following code to call up another form; Private Sub mnuPerennials_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPerennials.Click Dim PerennialsForm As New frmPerennials() PerennialsForm.ShowDialog() End Sub in the PerennialsForm is the following code Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Dim name As String = "warren" Dim frmMain As New frmMain() If chk1.Checked = True Then frmMain.lstDisplay.Items.Add(name) End If Me.Close() frmMain.Show() End Sub What I am trying to do is send a string back into the list box in the main form. With this code after the PerennialsForm closes, a new Main form opens, so now I have 2 main forms, but one of them has the String "Warren" in the list box. I have tried Me.Refresh() in the main form before the mnuPerennials_Click event ends (I take out the frmMain.Show()) thinking that all I need to do is refresh the main form, but the string is not there. Quote
*Gurus* Derek Stone Posted November 15, 2002 *Gurus* Posted November 15, 2002 http://www.visualbasicforum.com/showthread.php?s=&threadid=45326 Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.