Adding text to RichTextBox from a module -


In my attempt to clean my code, I have tried to keep all of my functions and subfines in one module. One of these sub-routines introduced a grid of Rich Textbox with data from the MS Access database. It works when sub-routine was in the form it was being used on, but not in my modules. Is there any specific reason for this? I noticed that when I tried to use the Rich Textbox in the code I needed to define it, so I went ahead and added it to the top of my module:

  dim mon1 As new Rich Textbox Diem Mon 2 New Rich Textbox Diem Mon 3 As New Rich Textbox Diem Mon 4 Like New Rich Textbox Diem Mon 5 As New Rich Textbox  

There was also does not text and Sbstrainin not thrown back to an error on my form f textbox. I tried to change it from dim to public and it does the same thing.

Can anyone put some light on it? Thank you.

You need to refer to it in your module, form 1. Reach Textbox 1 (Clearly replace them with placeholder with real name properties of your form and richtextbox controls).

It is assuming that you are referring to VB.NET.

Not being a manifestation of a new RichTextBox control in your module, help you referencing those views that you have already placed on your form with Visual Studio Editor or declared in your form's code. Have done

Is there any specific reason for this?

Due to the subtitle in your module does not work is simply because the rich textbox variables are not visible in that radius.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -