Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Fill label caption with range... (2000)

    I have in column O:

    00
    12
    AA
    A3
    ...

    I want fill label caption. with the range in column O and isert for eache cell the "-"

    and the result is:

    label1.caption="Tot. Sett: " & 00 &"-" & 12 &"-"&... ecc...

    do until the last cell is blank...
    How to?

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fill label caption with range... (2000)

    Assuming you information starts in cell O1

    Dim strCaption As String, oCol As String, iRow As Integer
    iRow = 1

    Do While Range("O" & iRow) <> ""
    strCaption = strCaption & Range("O" & iRow) & "-"
    iRow = iRow + 1
    Loop

    label1.caption = Left(strCaption, Len(strCaption) - 1)

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Fill label caption with range... (2000)

    tKS.
    Work perfect!
    Sal.

Posting Permissions

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