+ Reply to Thread
Results 1 to 2 of 2

comobox-name as variable

  1. #1
    Christian Galbavy
    Guest

    comobox-name as variable

    Hy!

    I have the following problem:
    I have a function, which should set the visibility of a variable list of
    comboboxes to false.
    Let's say I have comboboxes named "1", "2" and "3".
    Now I have tried the following:

    For counter = 1 to 3
    worksheets(my_sheet).counter.visible = False
    Next

    But now the program is looking for an object with the name "counter", and
    not "1" to "3".
    Has somebody an idea how I can manage this problem?

    Thanks for any help!

    Christian Galbavy




  2. #2
    Bob Phillips
    Guest

    Re: comobox-name as variable

    Depends if its a forms checkbox or a control toolbox combobox.

    Former

    worksheets(my_sheet).DropDowns(counter).Visible=True

    Latter

    worksheets(my_sheet).Oleobjects(counter).Visible=True

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Christian Galbavy" <slate@sbox.tugraz.at> wrote in message
    news:O%23yO4oNGFHA.3732@TK2MSFTNGP14.phx.gbl...
    > Hy!
    >
    > I have the following problem:
    > I have a function, which should set the visibility of a variable list of
    > comboboxes to false.
    > Let's say I have comboboxes named "1", "2" and "3".
    > Now I have tried the following:
    >
    > For counter = 1 to 3
    > worksheets(my_sheet).counter.visible = False
    > Next
    >
    > But now the program is looking for an object with the name "counter", and
    > not "1" to "3".
    > Has somebody an idea how I can manage this problem?
    >
    > Thanks for any help!
    >
    > Christian Galbavy
    >
    >
    >




+ 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