Results 1 to 17 of 17

Thread: [RESOLVED] Condense code...

Threaded View

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    Resolved [RESOLVED] Condense code...

    Hi, how would you condense this into on with instead of multiple due to them all having the same values but different number?
    VB Code:
    1. Private Sub Form_Load()
    2.     Call Button_Captions
    3.     Call Label_Captions
    4.    
    5.     Me.BackColor = vbBlue
    6.    
    7. 'THIS DOESNT WORK SO PROBABLY GOING WRONG SOMEWHERE.  WANT
    8. 'TO CONDENSE THE ONES BELOW INTO ONE INSTEAD OF MULTIPLE.
    9.     Dim intFrame As Integer
    10.     With Frame(intFrame)
    11.         .BackColor = vbBlue
    12.         .ForeColor = vbWhite
    13.     End With
    14.    
    15.     'With Frame(0)
    16.     '    .BackColor = vbBlue
    17.     '    .ForeColor = vbWhite
    18.     'End With
    19.    
    20.     'With Frame(1)
    21.     '    .BackColor = vbBlue
    22.     '    .ForeColor = vbWhite
    23.     'End With
    24.    
    25.     'With Frame(2)
    26.     '    .BackColor = vbBlue
    27.     '    .ForeColor = vbWhite
    28.     'End With
    29.  
    30.     'With Frame(3)
    31.     '    .BackColor = vbBlue
    32.     '    .ForeColor = vbWhite
    33.     'End With
    34.    
    35.     'With Frame(4)
    36.     '    .BackColor = vbBlue
    37.     '    .ForeColor = vbWhite
    38.     'End With
    39.    
    40.     'With Frame(5)
    41.     '    .BackColor = vbBlue
    42.     '    .ForeColor = vbWhite
    43.     'End With
    44.    
    45.     'With Frame(6)
    46.     '    .BackColor = vbBlue
    47.     '    .ForeColor = vbWhite
    48.     'End With
    49. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width