+ Reply to Thread
Results 1 to 3 of 3

Cells Range Reference not working properly

  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Unhappy Cells Range Reference not working properly

    I often have problems with the cells range reference method.

    For some reason I get an error and can't tell why. Other times it works fine. Is this just an unstable method to use or is this completely wrong? I'm assuming I am using the wrong syntax.

    It is definetly the range reference causing the problem.

    Dim cnt1 as integer, cnt2 as integer,cnt3 as integer

    cnt1 = 2
    cnt2 = 50
    cnt3 = 2

    dim myrange as range

    set myrange = sheets("sheet1").range(cells(2,cnt1), cells(cnt2,cnt3))
    I have no idea why it won't work. I'm basically searching a columner range of cells.

    Thanks
    Danny2000
    Last edited by danny2000; 05-25-2009 at 05:57 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: Cells Range Reference not working properly

    You need to fully reference all the objects

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Re: Cells Range Reference not working properly

    Thank you very very much. Thats great.

+ 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