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 !
0
8/24/2005 8:12:01 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
1278 Views

Similar Articles

[PageSpeed] 8

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

"Eric @ SEASH, Evansville" <EricSEASHEvansville@discussions.microsoft.com> 
wrote in message news:382C4F6E-BA78-45C5-B16A-5FB7DF9BDB40@microsoft.com...
>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 ! 


0
ng1 (1444)
8/24/2005 9:14:53 PM
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

0
dsd1 (5911)
8/25/2005 2:26:38 AM
Reply:

Similar Artilces:

How can I share my calendar but keep details hidden?
In Outlook 2007 how can I share my calendar with others but conceal the detailed information of the meeting? Basically, only sharing the subject and location. What type of email account do you have? -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlook and Exchange: mailto:EMO-NEWSLETTER-SUBSCRIBE-REQUEST@PEACH.EASE.LSOFT.COM Poll: What version of Outlook do you u...

Excedl 2003 / How to automize file opening
Hello Everyone below, my issue with excel 2003: When opening my "mainfile.xls", I wish it could open others "datafileS.xls", needed for my calculation within "mainfile.xls". All files are located in the same directory. a. mainfile.xls b. datafile1.xls c. datafile2.xls d. datafile3.xls In "mainfile.xls", I do use function such as INDIRECT("Datafile1.xls.....), to calculate various figures using my data files. My main problem is that if all my "datafileS.xls" are not opened when launching "mainfile.xls", this one cannot ret...

KDC Error #2
Hi I am confuss and unable to figure out which SPN is duplicated. Please help. The message generated by LDP as follows: CN=SERVER, OU=Domain Controllers, DC=ems,DC=local 1> name: SERVER 1> canonicalName: ems.local/DomainController/SERVER >>Dn: CN=KavernTan,OU=SBSUsers,OU=Users,OU=MyBusiness, DC=ems,DC=local 4> objectClass:top;person,organizationPerson;user; 1>cn:kavern Tan 1>distinguishedName:CN=Kavern Tan,OU=SBSUsers,OU=Users,OU=MyBusiness, Dc=ems,Dc=local 1>name:Kavern Tan 1>canonicalNamw: ems.local/MyBusiness/Users/SBSU...

Outlook 2007 send/receive error
Using Win XP-Pro. Was using Outlook Express for email. Installed Outlook 2007 this morning and imported addresses and files from Express. Everything seemed to work fine until I attempted to send/receive. Got error message (0x8007000E) "out of memory or system resources". Cleaned off all extraneous files and significantly reduced folder storage amounts. Have run all diagnostics that I can find with no problems identified. Have checked my internet connections and everythng worked fine. Problem seems to be with Outlook. Would appreciate any suggestions for correction of problem. ...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

Convert old PPT file
My company recently upgrade the office 2003 to office 2007. It works well for most of the users except one. He had thousands of old powerpoint slides which created around year 1996,1997. By using right click to check the file properties, it shows the the application name is 'Microsoft Powerpoint 4.0' .These file can be opened by powerpoint 2003 but can not being opened by powerpoint 2007. Does anyone have idea how I can bulk convert those files to powerpoint 2003 format? Thanks James Steve has a macro here http://www.pptfaq.com/FAQ00740.htm -- john ATSIGN PPTAl...

Macro
Can anybody tell me how to kick off a macro automatically as file is opened? Regards ...

XmlSchemaSet Compile error ?
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace ) Person.xsd includes Common-Naming.xsd ( anonimous schemas ) Common-Naming.xsd includes common.xsd ( both are anonimous schemas ) Compilation of Resident.xsd raise the following exception: "System.Xml.Schema.XmlSchemaException: The attribute 'oid' already exists...." That is wrong : the schemas are valid and well done ( Xml-Spy ). The problem seems to be that Common.xsd app...

Macro
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Processor: intel Hi, I'm thinking of buying Mac: Office 2008, but before I do I want to check that I will be able to download Scritpsmart collection of templates without any glitches: <http://www.bbc.co.uk/writersroom/scriptsmart/faq.shtml> Does anyone know if I can do this? Regards, SP. In article <ee98ff5.-1@webcrossing.caR9absDaxw>, StregaItalia@officeformac.com wrote: > Version: 2008 > Operating System: Mac OS X 10.4 (Tiger) > Processor: intel > > Hi, > > I'm thinking of buying Mac: Of...

Compile Error: Can't Find Project or Library
I have a spreadsheet containing 7 userforms and 9 modules. The spreadsheet has been developed on the same computer for a number of years and remained stable. However, I now want to make some amendments to one of the userforms. Whenever I make any changes to the UserForm_Initialize statement (even entering a blank space), I get the compile error 'can't find project or library'. Does anyone know why this happens and, more importantly, how to stop it. ...

Run macro automatically.
How do I make a macro run automatically when a worksheet it is attached to is loaded? right click on the sheet tab>view code>left window worksheet>right window activate -- Don Guillett SalesAid Software donaldb@281.com "Excel macro" <Excel macro@discussions.microsoft.com> wrote in message news:DD7AF1E3-9263-4523-AC49-A43ABA1AB9D0@microsoft.com... > How do I make a macro run automatically when a worksheet it is attached to is > loaded? I am unable to find "activate " when I right click on worksheet. ( i assume that you are referring to the windo...

File location?
Where are the aspx files stored? http://site/subsite/list/defautl.aspx where would i find that? the reason i ask is when i go to export there are a couple of files that im told access denied. not sure why since im the admin on all levels. Thanks Justin Well, that really depends... mostly your stuff is stored in SQL, which means that its really data in a table cell. However, depending on whether a page has been customized or not it could be pointing to definition files that are stored on the Web Front End servers, and you really want to leave those alone. Furthermore, th...

How to Use One PST file on Two Computers?
Hello: I have a desktop machine with a pst file in my Outlook 2003. I would like to copy this pst file to my laptop. How do I synchronize the same file on 2 machines so I won't get duplicate e-mails? I use one premium Yahoo e-mail account and several free Yahoo accounts with YahooPOPs.. Thanks in advance, Spudy Hi Spudy, it is not possible by default to share PST files. A list of a list of third-party synctools are also on this site: http://www.slipstick.com/outlook/sync.htm On the Microsoft Office Marketplace site is a list of third-party messaging tools: http://office.microsoft.com...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

Attached Toolbars Macros
Excel 2003 I have a custom tool bar, this tool bar has several items, each item is pointing to a VBA code. This tool bar is attached to the worksheet. I've copied this spreadsheet to several computers. After I copied the spreadsheet I decided to rename the spreadsheet, after I renamed the spreadsheet the Toolbar Item's macros were still pointing to the old name, I reasigned each tool bar item to the current spreadsheet, saved the spreadsheet and everything was working on my computer, but when I re-copied the new spreadsheet to other computers and I clicked on the Toolbar Item...

encoding wmv file
hello I have a sample application developed in MFC dialog based project using directx sdk 9. the sample captures video from a webcam and saves it to a wmv file now i have to put that video into streaming server. i beleive that i will have to encode the wmv file using some codecs to put it into streaming server. i want to do the capturing and encoding simultaneously. below is a portion of my code to capture video // capture video pBuilder->RenderStream(&PIN_CATEGORY_CAPTURE, // Pin category &MEDIATYPE_Video, // Media type p...

Unable to Open a backup file (Money 2004) on a new computer
Though I am computer savvy, MS Money is driving me crazy. Last year I have installed Money 2004 on my laptop and used it once a month to download transactions. Everytime I close money, I get a new file created on my hard disk with the name "My Money Backup ++.mbf", where + indicates a number. I always open the latest .mbf file to access the information. Now I have purchased a new laptop and installed Money 2004 on that as well. I have copied the latest .mbf file from my old laptop onto a diskette and tried to open it from the new laptop in vain. Whatever I do, I get stuc...

sbs 2008 launcher error
just loaded sbs 2008. when i run either the http://connect or launcher i get the errror 'an error occurred while downloading the connect computer application. please run this application again.' i tried this on both a vista and xpp client. i have been reading a few post on this but no solution found. any suggestions? Thanks. -- sgman ...

Importing a pst file in Outlook XP
My computer's configuration changed and I had to delete some hard disk partitions. After doing that, when I open Outlook it pops up a window saying "Unable to open your default e-mail folders. The file F:\{...}\outlook .pst could not be opened". Then I press OK and then a new pop-up says "Would you like to open your default File System folder instead?" If I press Yes, Outlook opens without (of course) the outlook.pst file. Also, I can't import my pst file neither I can Create a new one. If I press No, Outlook closes. Does anyone know how to open my pst fil...

Protected sheets and running macros
i have a sheet with a macro ran by a normal button at the top. Howeve when i protect the worksheet where ever i click on the sheet the macr executes. Can any one offer any advice on how to stop this? Thanks Robert -- Message posted from http://www.ExcelForum.com hi, i am not able to reproduce the problem, hence i may not be able t provide a panacea for that issue. here is what i suggest. i have a sheet that has a macro that is run when a control toolbo button (that is, not a form button) is clicked. this sheet is protected based on the user logged in. what i have don is to protect t...

File In Use
I am trying to open an excel program that is shared on a network drive. When I go to open it the following message box pops up.... File In Use name.xls is locked for editing by 'user name'. open by 'read only' or click 'notify' to open read-only and receive notification when the document is no longer in use. The user name that it is saying is me and I don't have the file open. Does anyone know why it is saying this or how to fix it? I guess it thinks I have the file open, maybe it didn't close right but I can't figure it out. Thanks Dave ma...

Error when moving mailbox
I received this error when I am move some mailboxes, not all. I checked all the permissions are good. Can someone help please? <item adsPath="LDAP://xxx/CN=xxx,OU=xxx,OU=Users and Groups,DC=xxx,DC=ad" class="user"> <progress code="21" milliseconds="23937">Moving messages.</progress> - <summary isWarning="false" errorCode="0xc1050301"> An unexpected, unknown error has occurred. MAPI or an unspecified service provider. ID no: 80040301-0000-00000000 On Thu, 9 Feb 2006 16:16:30 -0800, Speedyturtle <S...

Macro Freezes Reading Pane
I have a macro that Sends/Receives Tasks from Project Server into Outlook Tasks. Everything is working fine, except one weird thing that happens. I have the Timer set on the macro and it starts as soon as Outlook starts. The macro gets the tasks from ProjectServer every hour. As soon as the macro starts running the Reading pane freezes in the Inbox. If i stop the macro then Reading pane is back to normal. Can anyone please tell me if there is something I can do in VBA to fix this annoying issue. Thanks a lot ...

Macro to remove rows?
Hi, I receive thousands of rows of data from an extract that comes from a database. The data extract automatically generates page headers that need to be removed, and I would love to automate this process. The headers do have a pattern to them, but I'm not clever enough to figure out a good way to use that to write a macro. The first row of the header starts with hyphens ------------------------------- Then there's a variable number of rows of header data to delete followed by another row of hyphens ------------------------------- Then 2 additional rows that must be deleted. The nu...

Remoting and File Size Limit
Hello Group: I have been directed to ask this question in this group. If this is the incorrect forum: please let me know. We have a web-app that uses remoting to access some components. XML from the web page is sent to these components and a value is returned. We have noticed that on one server: this works great, but on two other servers, after the XML gets to be bigger than 4KB, the XML gets truncated and as a result: the process fails. We feel failrly confident this is some server issue / setting and not really a coding issue however are totally clueless on where to look to make ...