Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform Controls jnf40 Excel Programming 1 October 18th 07 04:54 PM
userform controls natanz[_2_] Excel Programming 3 November 2nd 05 02:38 PM
looping through userform controls changing enabled and locked properties JulieD Excel Programming 2 August 14th 04 12:44 PM
Help please with UserForm controls sa3214 Excel Programming 4 July 2nd 04 03:00 AM
Add controls to UserForm Vyyk Drago Excel Programming 3 August 26th 03 01:22 PM


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"