+ Reply to Thread
Results 1 to 4 of 4

Object variables

  1. #1
    Registered User
    Join Date
    12-14-2010
    Location
    Texas,United Stated
    MS-Off Ver
    Excel 2007
    Posts
    63

    Object variables

    Please see the attached file. This is a sheet I created that has all my company vendor information on it (Deleted all info for security). At the top I made buttons with the letters of the alphabet in them. You can hit the button you want and it will take you to the corresponding location in the field of vendors. This sheet works most of the day and then for an unknown reason (to me) it will pop up the "Object variable or With block variable not set" error. I dont know that much about VBA... PLEASE HELP!!
    Last edited by jbmerrel; 12-08-2011 at 10:18 AM.

  2. #2
    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,302

    Re: Object variable help

    I might be missing something, but is the code in another workbook?

    '\\hou-cf-02\homedir\jmerrel\Excel Files\1 - DXP Daily\2 - Item Inquiry.xls'!FindA

    There doesn't appear to be any code in the example you have posted. Is it possiblt that the macro fails because someone has opened the source workbook?

    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


  3. #3
    Registered User
    Join Date
    12-14-2010
    Location
    Texas,United Stated
    MS-Off Ver
    Excel 2007
    Posts
    63

    Re: Object variable help

    Uploaded incorrectly give me a minute and I'll fix it

  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,302

    Re: Object variables

    The code to select the alphabetic entry looks OK, if a little repetitive.

    Your print code could be a little slicker, for example:

    Please Login or Register  to view this content.

    And

    Please Login or Register  to view this content.

    Could just be:

    Please Login or Register  to view this content.

    And:

    Please Login or Register  to view this content.

    could be:

    Please Login or Register  to view this content.

    Similarly

    Please Login or Register  to view this content.

    could be:

    Please Login or Register  to view this content.

    The only thing I can think of is that an error occurs in another part of the code that resets some variable(s).


    I appreciate that you had to take out the sensitive data but it's difficult to test stuff without representative information.

    All the code is range specific so I'm not entirely sure if or how it works when you add entries into a range.


    Sorry, I can't be more help at the moment.

    Regards, TMS

+ 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