Many userforms wth the same names for textbox, comboboxs and buttons

akash.add

Member
Joined
Nov 21, 2012
Messages
5
Programming Experience
Beginner
Dear All,

I am making a software that calculates size for many equipments. This software takes input via separate input userform for each equipment . However, all these separate input userforms are having similar textboxs, checkboxs, buttons etc. with same names.
(There is one parent userform from which user can select any input userform among all these input useforms via a combobox.)

Now, the problem is as follow: As all these input userforms are having textboxs, comboboxs and buttons of the same names, VB.NET shows error that these textboxs are already declared.

Please Help.

=Akash

P.S. : I cant change the names of these textboxs as there are many textboxs in one input userform. And there are many such calculation input userform.
 
Hi,

The fact that you have many input forms with the same control names will have no bearing on the fact that you get an error saying that these TextBox's are already declared since these controls are private to each individual instance of each form.

For ease of tracking down the issue try and narrow this down to two forms which you can see are conflicting and then post the relevant specific code and error messages associated with when and where this occurs and we will see if we can help you better.

Hope that helps.

Cheers,

Ian
 
Seems like an odd issue, per the other comment by IanRyder.

What are the "modifier" fields for each text box on each form set to?

You may be Import statements to avoid qualifying your calls to different form methods and fields - since you are using the same names for controls, consider dumping those import statments and fully qualifying calls to text boxes, etc. across forms to avoid confusion.

A screen shot or two, etc. would help identify the root issue.
 
Back
Top