+ Reply to Thread
Results 1 to 3 of 3

auto filter... value from different workbook

  1. #1
    Registered User
    Join Date
    05-28-2011
    Location
    Cartersville, GA
    MS-Off Ver
    Excel 2010
    Posts
    3

    auto filter... value from different workbook

    I am still learning about Dimension in VBA but I am having trouble with this code. I am not sure if it has to do with my use of “Dim” or something totally different. Right now I am getting a compile error (object required). But in case I have this all wrong, what I am looking to do is open and auto filter a different workbook (CAF 10.xls) based on the result of the cell “ProductCode” in workbook “QCDS REST FORM”. For example if 100401 was entered into the cell ProductCode on sheet QCDS RESET FORM, I would like for workbook CAF 10.xls to autofilter its data to 100401.

    Hopefully that is a good enough description, if not I will see what I can to


    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: auto filter... value from different workbook

    VBA has two assignment operators, Let and Set. Set applies only to object variable, not scalar variables (strings, numeric variables, ...), and the Let keyword is optional.

    So remove the word Set from the offending statement.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-28-2011
    Location
    Cartersville, GA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Re: auto filter... value from different workbook

    Ok, great that fixed my code and thank you for the information about Let (didnt know that was part of the VBA laguage). Works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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