ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing the controls for a userform (https://www.excelbanter.com/excel-programming/444029-changing-controls-userform.html)

[email protected]

changing the controls for a userform
 
Hi Everyone,
I have a userform which there are too many textboxes something like
500. Depends on the resolution, I need to alter them sometimes even
need to create them all over again.I have to give them a specific Name
to work with my codes.Here is my question, is there any way that I can
change their names automatically with a macro. I know it is not
possible in runtime, but it's so hard to rename those textboxes all
over again whenever I need to alter. Just for your reference those
textbox names goes like

Gm1txt1,Gm1txt2,Gm1txt3,Gm1txt4,.....Gm1txt15 then next column
Gm2txt1,Gm2txt2,Gm2txt3,Gm2txt4,.....Gm2txt15
Gm3txt1,Gm3txt2,Gm3txt3,Gm3txt4,.....Gm3txt15
..
..
Gm38txt1,Gm38txt2,Gm38txt3,Gm38txt4,.....Gm38txt15

Thanks in advance,
Baha

GS[_5_]

changing the controls for a userform
 
pretended :
Hi Everyone,
I have a userform which there are too many textboxes something like
500. Depends on the resolution, I need to alter them sometimes even
need to create them all over again.I have to give them a specific Name
to work with my codes.Here is my question, is there any way that I can
change their names automatically with a macro. I know it is not
possible in runtime, but it's so hard to rename those textboxes all
over again whenever I need to alter. Just for your reference those
textbox names goes like

Gm1txt1,Gm1txt2,Gm1txt3,Gm1txt4,.....Gm1txt15 then next column
Gm2txt1,Gm2txt2,Gm2txt3,Gm2txt4,.....Gm2txt15
Gm3txt1,Gm3txt2,Gm3txt3,Gm3txt4,.....Gm3txt15
.
.
Gm38txt1,Gm38txt2,Gm38txt3,Gm38txt4,.....Gm38txt15

Thanks in advance,
Baha


Would doing something like this work for you...?

Use the 15 textboxes only. Put the GM# in a combobox. User selects GM#
from combobox, textboxes appropriately clear (or populate with default
data), and your code is modified to process the inputs according to the
value selected in the combobox.

Alternatively, if your app cycles through the GM#s automatically then
reset your code to process with the new GM#.

Note that this concept allows you to reuse the same procedure[s] for
each iteration, OR call GM#-specific procedures as required.

HTH

--
Garry

Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc



[email protected]

changing the controls for a userform
 
Hi Gary,

Thanks for the reply but I am afraid I could not understand you
clearly.Is there any way you give me more details?
thanks
Baha

[email protected]

changing the controls for a userform
 
Gary,

Thank you for the reply. However that user from should be that many
textbox. Because that is the for the new game display in my casino. I
tried to make a grinds in the userform that's why I prepare that many
textbox.I am using excel 2003 and that's the only way that I think of
so far. There are endless game entries for the user which prompt by
the numberpad by (1,2,3 etc..).After every 38 games it clears all
textbox entries and reloads again. That is the whole story. That's why
I cannot use combo boxes.
I think I have no choice that I need to enter manually each time I
design the textboxes.
Thank you very much for your answer again.
Merry Christmas and Happy New Year

Baha


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com