Results 1 to 7 of 7

Object required error- looping through array- noobie

Threaded View

  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.

    Sub lookthrough()
    
    Dim georange As Range
    Dim geos As Variant
    
    
    Range("B8").Select
    Set georange = Range(Selection, Selection.End(xlToRight)).Select
    
    Set geos = georange.Value
    
    For i = 1 To UBound(geos)
        MsgBox geos(i, 1)
    Next
    
    
    End Sub
    Last edited by sickel2; 10-12-2011 at 06:26 AM.

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