Results 1 to 4 of 4

Thread: make loop

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Cairns,North Queensland, Australia
    Posts
    21
    I want to make a loop to replace this.

    With frmtemp
    .Text(0) = strCell(0)
    .Text(1) = strCell(1)
    .Text(2) = strCell(2)
    .Text(3) = strCell(3)
    .Text(4) = strCell(4)
    End With

    Any help would be greatly appreciated.

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177
    Try:
    Code:
    Dim lIndex As Long
    
    For lIndex = 0 To 4
        frmTemp.Text(lIndex) = strCell(lIndex)
    Next

  3. #3
    Addicted Member
    Join Date
    Oct 1999
    Location
    Brossard, Québec, Canada
    Posts
    241

    here you go

    Dim I as integer

    With frmTemp
    For I = 0 to 4 step 1
    .text(I)=strCell(I)
    next I
    end with

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Cairns,North Queensland, Australia
    Posts
    21
    Thanks very much guys, I'm new at this and loops are not one of my stonger points.

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