Dim Editor As frmEditor
... does not create an editor, it declares only an empty variable, therefore ...
Dim Editor As frmEditor
Editor.Text = "New Form"
... will fail!
You must create a form with New
:
Dim Editor As frmEditor
Editor = New frmEditor()
Editor.Text = "New Form"
Or
Dim Editor As frmEditor = New frmEditor()
Editor.Text = "New Form"
To answer your question:
Assign the "old" editor to another variable
Dim oldEditor As Editor = frmEditor
frmEditor = New frmEditor()
frmEditor.RtfText = oldEditor.RtfText
Also make a public property that allows you to access what you need to access from outside of the form
Public Property RtfText() As String
Get
Return richTextBox.Rtf
End Get
Set(ByVal value As String)
richTextBox.Rtf = value
End Set
End Property