Paul, Thank you very much, for the detailed explanation.
Regards Eugene On Wed, Nov 19, 2014 at 6:27 PM, Paul Schreiner <schreiner_p...@att.net> wrote: > In the "Orders" file, you have: > > ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=2, > Criteria1:=MYNUM > > Breaking this down: > "ListObjects" is a property of the "Worksheet" Object. > That means that it needs a Worksheet in order to operate. > > In your case, you've specified that you want the ListObjects property of > the "Activesheet". > > "Activesheet" actually a short way of saying > "the active sheet of the active workbook" > > Instead, you COULD have said something like: > > Workbooks("Orders.xls").Sheets(1) > which specifies the first sheet of the workbook called "Orders.xls" > > or > Workbooks("Orders.xls").Sheets("Sheet1") > specifies the sheet called "Sheet1" in the workbook called "Orders.xls" > > So, if you specify a sheet in ANOTHER workbook, you can use something like: > > Workbooks("Orders.xls").Sheets("Sheet1").ListObjects("Table1").Range.AutoFilter > _ > Field:=2, Criteria1:=MYNUM > Workbooks("Stocks.xls").Sheets("Sheet1").ListObjects("Table1").Range.AutoFilter > _ > Field:=1, Criteria1:=MYNUM > > (notice that your "ITEM" field in the "Stocks" workbook is column 1 > instead of 2) > > hope this helps > > *Paul* > ----------------------------------------- > > > > > > > > *“Do all the good you can,By all the means you can,In all the ways you > can,In all the places you can,At all the times you can,To all the people > you can,As long as ever you can.” - John Wesley* > ----------------------------------------- > > *From:* Eugene Bernard <eugene.bern...@gmail.com> > *To:* excel-macros@googlegroups.com > *Sent:* Tuesday, November 18, 2014 11:13 AM > *Subject:* $$Excel-Macros$$ Tandem filtering > > Hi all, > > I have attached two workbooks, Orders and Stocks. > > In the Orders workbook, I have a macro, which filters Itemwise once I run > the macro and enter the filter values like "A001", "A002" etc.,. > > I like to have a slight modifications in the same macro, so that, when I > run the macro, filtering should happen simultaneously in the both > workbooks "Orders" and "Stock" > > TIA > > Regards > Eugene > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > > > -- > Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s > =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ > https://www.facebook.com/discussexcel > > FORUM RULES > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > 2) Don't post a question in the thread of another member. > 3) Don't post questions regarding breaking or bypassing any security > measure. > 4) Acknowledge the responses you receive, good or bad. > 5) Jobs posting is not allowed. > 6) Sharing copyrighted material and their links is not allowed. > > NOTE : Don't ever post confidential data in a workbook. Forum owners and > members are not responsible for any loss. > --- > You received this message because you are subscribed to the Google Groups > "MS EXCEL AND VBA MACROS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to excel-macros+unsubscr...@googlegroups.com. > To post to this group, send email to excel-macros@googlegroups.com. > Visit this group at http://groups.google.com/group/excel-macros. > For more options, visit https://groups.google.com/d/optout. > -- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel FORUM RULES 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Jobs posting is not allowed. 6) Sharing copyrighted material and their links is not allowed. NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss. --- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com. To post to this group, send email to excel-macros@googlegroups.com. Visit this group at http://groups.google.com/group/excel-macros. For more options, visit https://groups.google.com/d/optout.