+ Reply to Thread
Results 1 to 7 of 7

Object required error- looping through array- noobie

  1. #1
    Registered User
    Join Date
    06-18-2008
    Posts
    7

    Object required error- looping through array- noobie

    I'm getting an object required error and I think it's coming from the for loop.

    I'm trying to make an array out of the values of the cells in a range and then print them to make sure that I did it correctly.

    Many thanks for any help. Should be a softy.

    Please Login or Register  to view this content.
    Last edited by sickel2; 10-12-2011 at 06:26 AM.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Object required error- looping through array- noobie

    First of all, you have to use CODE tags to publish any code on this forum (refer to forum's rules).
    You insert the word CODE within square brackets at the beginning of your code and /CODE within square brackets at the end. You must change your thread in order to comply with forum's rules.

    You have couples of errors in your code. try this one:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565

    Re: Object required error- looping through array- noobie

    Cross-posted here
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Object required error- looping through array- noobie

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    06-18-2008
    Posts
    7

    Re: Object required error- looping through array- noobie

    Thanks. The command to select all contiguous cells to the right Selection.End(xlToRight))
    is going down so that my range is B8:#8 . Any ideas why it would go down instead of to the right?

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Object required error- looping through array- noobie

    This works for me
    Please Login or Register  to view this content.
    Note: no need to select B8

  7. #7
    Registered User
    Join Date
    06-18-2008
    Posts
    7

    Re: Object required error- looping through array- noobie

    This works. Thank you Roy.

+ 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