Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Eric @ SEASH, Evansville
 
Posts: n/a
Default Macro error when file is shared

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 !
  #2   Report Post  
Anne Troy
 
Posts: n/a
Default

About shared workbooks:
http://www.officearticles.com/excel/...soft_excel.htm
************
Anne Troy
www.OfficeArticles.com

"Eric @ SEASH, Evansville"
wrote in message ...
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 !



  #3   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

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'

Eric wrote:
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 !



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
save original data after macro is run again MINAL ZUNKE New Users to Excel 3 July 7th 05 12:48 PM
Shared Excel file Peter Sturm Excel Discussion (Misc queries) 0 April 28th 05 12:23 AM
shared file tjh Excel Worksheet Functions 0 March 10th 05 04:33 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
creat a macro to look for a file Kelly****** Excel Discussion (Misc queries) 1 January 2nd 05 09:24 AM


All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"