+ Reply to Thread
Results 1 to 3 of 3

adding an integer to a string in code

  1. #1
    Registered User
    Join Date
    01-19-2006
    Posts
    35

    adding an integer to a string in code

    Hi Guys,

    Problem: >> I have 100 buttons on a userform named
    Construct.Slat1
    Construct.Slat2
    Construct.Slat3
    etc etc
    I need to make some of them invisible i.e
    from visSlats to 100

    Here is my code.

    visSlats = Range("Vis").Value
    visSlats = visSlats + 1
    For v = visSlats To 100
    Construct.Slat(v).Visible = False
    Next v

    (This dosent work)
    Where Construct is the userform name

    What do I need to do to make this work??

    Phil

  2. #2
    Bob Phillips
    Guest

    Re: adding an integer to a string in code

    I think this is what you mean

    visSlats = Range("Vis").Value
    visSlats = visSlats + 1
    For v = visSlats To 100
    Construct.Controls("Slat" & v).Visible = False
    Next v


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "pspyve" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi Guys,
    >
    > Problem: >> I have 100 buttons on a userform named
    > Construct.Slat1
    > Construct.Slat2
    > Construct.Slat3
    > etc etc
    > I need to make some of them invisible i.e
    > from visSlats to 100
    >
    > Here is my code.
    >
    > visSlats = Range("Vis").Value
    > visSlats = visSlats + 1
    > For v = visSlats To 100
    > Construct.Slat(v).Visible = False
    > Next v
    >
    > (This dosent work)
    > Where Construct is the userform name
    >
    > What do I need to do to make this work??
    >
    > Phil
    >
    >
    > --
    > pspyve
    > ------------------------------------------------------------------------
    > pspyve's Profile:

    http://www.excelforum.com/member.php...o&userid=30656
    > View this thread: http://www.excelforum.com/showthread...hreadid=571292
    >




  3. #3
    Registered User
    Join Date
    01-19-2006
    Posts
    35
    Thanks Bob. Works like a treat.

    Phil

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1