Results 1 to 17 of 17

Thread: [RESOLVED] Condense code...

Hybrid View

  1. #1
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Condense code...

    You can loop through control array (sample below) or controls collection (if you don't have control array):
    VB Code:
    1. Dim i%
    2.  
    3. On Error Resume Next
    4.  
    5. For i = Frame.Lbound To Frame.Ubound
    6.     Frame(i).BackColor = vbBlue
    7.     Frame(i).ForeColor = vbWhite
    8. Next i

  2. #2

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

    Re: Condense code...

    Quote Originally Posted by RhinoBull
    You can loop through control array (sample below) or controls collection (if you don't have control array):
    VB Code:
    1. Dim i%
    2.  
    3. On Error Resume Next
    4.  
    5. For i = Frame.Lbound To Frame.Ubound
    6.     Frame(i).BackColor = vbBlue
    7.     Frame(i).ForeColor = vbWhite
    8. Next i
    thanks for the sample Rhino. % is the same as a long right?

  3. #3

  4. #4

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

    Re: Condense code...

    Quote Originally Posted by RhinoBull
    You're welcome.
    % is a shortcut for Integer. When it comes to Control Arrays - Integer type is more than enough.
    Learn something new every day! love shortcuts. will have to go to MSDN online to see if i can read up about this stuff. would rather type on char instead of the whole darned thing.

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Condense code...

    Quote Originally Posted by BrailleSchool
    Learn something new every day! love shortcuts. will have to go to MSDN online to see if i can read up about this stuff. would rather type on char instead of the whole darned thing.
    LOL... I wouldn't recommend to use it too often - only "old timers" may recognize these symbols - all "new commers" will get lost and frustrated, though.

  6. #6

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

    Re: Condense code...

    Quote Originally Posted by RhinoBull
    LOL... I wouldn't recommend to use it too often - only "old timers" may recognize these symbols - all "new commers" will get lost and frustrated, though.
    i would rather be an "old timer" than wear my keyboard out lol. anyway, i am old, im almos 30. lol.

  7. #7

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