+ Reply to Thread
Results 1 to 4 of 4

Object Array / Loop

  1. #1
    mpeplow
    Guest

    Question Object Array / Loop

    In visual basic I could create and object arrary for the form objects and my code would look like this.

    Please Login or Register  to view this content.
    In VBA it looks like this.

    Please Login or Register  to view this content.
    Is there anyway to make the VBA code more like the Visual basic code? I have not been able to find any information on creating object arrays on the userform.

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Tr with this code:

    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    mpeplow
    Guest
    SWEET! Seems to be working.

    I didn't know that I could add stuff like in the middle of a command line.

    This will be extremly useful!!

    THANKS!!!

    That just elimated countless pages of code. Thanks again!
    Last edited by mpeplow; 04-22-2007 at 03:33 PM.

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Userform1.Controls(i) already indexes all the controls. But it doesn't split them out by type.

    What kind of control is Progress Bar1?

    I'll assume that ProgressBar1 is a name that you gave to the control. This should create an array of the controls, ProgressBars.
    Please Login or Register  to view this content.

+ 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