+ Reply to Thread
Results 1 to 3 of 3

Searching for user defined value in range, sending only these values to array ERROR

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    boston
    MS-Off Ver
    Excel 2003
    Posts
    11

    Searching for user defined value in range, sending only these values to array ERROR

    For some reason my code compiles, but it won't insert anything into the sheet ArrayData for the Chart Generation....This section I speak of is towards the end of the code with a For/If loop...

    Since there are many values and excel's series input has a character limit of 255, I am putting these values in an unused sheet....but they aren't showing up when the code writes... and now when I corrected my reference to sheet for the range before the loop seen below where it is all caps...I get an error saying Application-defined or object defined error

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,934

    Re: Searching for user defined value in range, sending only these values to array ERROR

    Note that P2 is the cell address string, so you need the address of the bottom cell:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by protonLeah; 02-01-2013 at 01:01 AM.
    Ben Van Johnson

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Searching for user defined value in range, sending only these values to array ERROR

    It's confusing having a string variable called sheet. It's too similar to all the other Sheets references.

    Is there an existing sheet with the same tab name as your variable sheet value?

    If yes, you may want to define your range like this...
    Set slotRang = Worksheets(sheet).Range("P2", Worksheets(sheet).Range("P2").End(xlDown))

+ 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