+ Reply to Thread
Results 1 to 6 of 6

Can anyone tell me why this isn't working? .offset

  1. #1
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Can anyone tell me why this isn't working? .offset

    Please Login or Register  to view this content.
    I'm following other vba code I've seen doing this and I can't pinpoint where I'm goofing up.

    Run-Time error '1004':
    Application-defined or object-defined error
    From what I can tell, this should take the value in txtVendorName and put it into cell column A of the row below the last line of the named range VenderList. I have a ton of items I need to add to the named-range, so once I figure out this small thing, it's a much larger world. FYI, the next line of code I didn't include extends the named-range by +1.
    Last edited by Taemex; 12-12-2014 at 04:18 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Can anyone tell me why this isn't working? .offset

    How is 'VendorList' defined?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Can anyone tell me why this isn't working? .offset

    =vendors!$a:$o

    I should mention I use it with vLookup without issue, i.e.:

    Please Login or Register  to view this content.
    Last edited by Taemex; 12-12-2014 at 05:45 PM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Can anyone tell me why this isn't working? .offset

    It is defined as full columns. So your row count will be the number of rows on the worksheet. So, you can't offset from that.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Can anyone tell me why this isn't working? .offset

    Lol, that makes a lot of sense! Solved!

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Can anyone tell me why this isn't working? .offset

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Offset Function Not working for me
    By csch123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2014, 02:05 PM
  2. Offset not working
    By sput_sput in forum Excel General
    Replies: 12
    Last Post: 08-25-2010, 02:51 PM
  3. [SOLVED] offset not working
    By BorisS in forum Excel General
    Replies: 2
    Last Post: 11-30-2005, 04:20 AM
  4. Offset now working?
    By sleah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2005, 01:57 AM
  5. Offset Not Working
    By sleah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2005, 05:56 PM

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