Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 30th, 2004, 4:10 PM   #1
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,646
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
ok here is the code i have:
    frmPartNum.lblUse1.Caption = strOWArray(1)
    frmPartNum.lblUse2.Caption = strOWArray(2)
    frmPartNum.lblUse3.Caption = strOWArray(3)
    frmPartNum.lblUse4.Caption = strOWArray(4)
    frmPartNum.lblUse5.Caption = strOWArray(5)
    frmPartNum.lblUse6.Caption = strOWArray(6)
    frmPartNum.lblUse7.Caption = strOWArray(7)
    frmPartNum.lblUse8.Caption = strOWArray(8)
    frmPartNum.lblUse9.Caption = strOWArray(9)
    frmPartNum.lblUse10.Caption = strOWArray(10)
    frmPartNum.lblUse11.Caption = strOWArray(11)
    frmPartNum.lblUse12.Caption = strOWArray(12)
    frmPartNum.lblUse13.Caption = strOWArray(13)
    frmPartNum.lblUse14.Caption = strOWArray(14)
    frmPartNum.lblUse15.Caption = strOWArray(15)
    frmPartNum.lblUse16.Caption = strOWArray(16)

now this would be alot better if i could do a simple little loop on it that way i wouldnt have to have the code look like this even tho it works. so i was wondering if it is possible to make the lbluse* name something so that i can change where the * is?? is this even possible
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Aug 30th, 2004, 4:14 PM   #2
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
you can make a control array, that's what you need.

while your in forum view just select the forum item that you want to amke an array of and right click and select copy, then paste.


do that till you have 16 of em.

then you can loop through em later in the code. like this:

for x = 0 to 15 step 1
     thing = lblUse[x]
      MsgBox thing
Next x
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 30th, 2004, 5:11 PM   #3
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,646
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
thanks
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Aug 31st, 2004, 8:38 AM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
No Prob. Even though i answered this in the irc channel, i thought that i would post the answer here so others could use it.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:34 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC