The function calls will work just fine as long as they are Public Sub or Public Function. However the references to the controls on the form will need to be modified. For example

With Form1.RichTextBox1