Macro error when file is shared

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that works fine when the file is not shared, but when it is
shared I get "Run-time error '1004': AdvancedFilter method of Range class
failed". Can you not run macros in a shared file ? My macro is show below:

Sub processdrg()
'
' processdrg Macro
' Macro recorded 8/24/2005 by EDreshfield
'
' Keyboard Shortcut: Ctrl+d
'
Range("drgcode").AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range( _
"drg"), Unique:=True
Application.Goto Reference:="drgextract"
Range("drgextract").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToLeft)).Select
Selection.Sort Key1:=Range("drgextract"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

Am I simply missing something obvious ?

Thanks !
 
You can run macros in a shared workbook, but you can't us an Advanced
Filter. For more information on shared workbooks, look in Excel's Help,
under the topic 'Features that are unavailable in shared workbooks'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top