Results 1 to 3 of 3

Thread: Setting Combox values using "For Each" statement ...

Threaded View

  1. #1

    Thread Starter
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818

    Resolved Setting Combox values using "For Each" statement ...

    I've got a form in Excel that contains 20+ comboboxes.
    Unfortunately I can't use control arrays, but rather than setting the rowsource for each combobox in turn I am trying to do the following :

    VB Code:
    1. Dim cbo As ComboBox
    2.    
    3.     For Each cbo In [B]forms[/B]
    4.         cbo.RowSource = "'Data Source'!P3:P4"
    5.     Next

    For some reason this doesn't work ?!?!
    The "forms" object seems empty ?!!
    Do I have to address it as something else in VBA ?
    Last edited by TheBionicOrange; Mar 22nd, 2006 at 11:43 AM.

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