Macro not working in shared work book

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello everyone,

my macro works fine, but when i share my work book it is throwing some error,
Run-time error '1004':
AdvancedFilter method of Range class failedRead more

it will be great if some one could help me out
Macro code is

Sub Extract2()
'
' Extract2 Macro
' Refresh
'
' Keyboard Shortcut: Ctrl+Shift+R
'
    Rows("61:116").Select
    Selection.Delete Shift:=xlUp
    Range("A61").Select
    Sheets("Data").Range("A1:Q600").AdvancedFilter Action:=xlFilterCopy, _
        CriteriaRange:=Sheets("Data").Range("S1:S2"), CopyToRange:=Range("A61"), _
        Unique:=False
End Sub




Thanks in advance for ur ans...

5 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
What version of excel you are using
Hi Rizvisa,

Thanks alot for ur response,
I tested with Office 2010 and 2007, But saved as .XLS file only. Since it is a shared workbook, Few users may access with 2003. I tried saving as .XLSM file also and tried, even then i'm getting the same error. whever the "Range" method is called, it is giving that error.

Kindly help me out...
I'm not advanced user, Kindly reply conssidering me as Beginner,
Thanks alot for ur patience and time..
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
I think you cannot do Advance filter when you share the book. Excel will not allow it
oooooooooh...!!! That's sad..:(

MY case is like Q column of "Sheet1" is having the value true or false.
All true value rows have to be copied from row 61 of "Sheet2" sheet..

If is any other alternative.... Pls do help me...
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
Try simple filter and copy and paste values.

If this does not help then could you please upload a sample EXCEL file WITH sample data, macro, formula , conditional formatting etc on some shared site like http://wikisend.com/
AND post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too.


Note:
your data need not be to be real data but a good representative of how data looks like