Excel Shared Run-time Error 1004
Contents |
Forums Excel Questions Run time error 1004 when running macro in shared workbook? Results 1 to 5 of 5 Run time error 1004 when running macro in shared workbook?This is a discussion on Run excel run time error 1004 application defined or object defined error time error 1004 when running macro in shared workbook? within the Excel Questions forums, excel run time error 1004 general odbc error part of the Question Forums category; When running a macro to insert a new line in a table I get runtime
Excel Run Time Error 1004 Select Method Of Range Class Failed
error '1004' - application or ... LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to
Excel Run Time Error 1004 Method Saveas Of Object _workbook Failed
Hybrid Mode Switch to Threaded Mode Apr 29th, 2010,03:40 AM #1 richard.ca Board Regular Join Date Nov 2007 Location Solothurn, Switzerland Posts 100 Run time error 1004 when running macro in shared workbook? When running a macro to insert a new line in a table I get runtime error '1004' - application or object definition error (translation from German). The macro works perfectly well when the workbook is configured and excel run time error 1004 select method of worksheet class failed saved as 'not shared'. Problem is I can't get into the debugger to see exactly where it's crashing since VBA is locked out when the workbook is shared. Any ideas what's going on and what I can do about it? Thanks... Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Apr 29th, 2010,03:47 AM #2 Sandeep Warrier Board Regularmmmm Pizza Join Date Oct 2008 Location Mumbai, India Posts 2,672 Re: Run time error 1004 when running macro in shared workbook? Shared workbooks have many limitations. You can check out what can and cannot be done in a shared workbook using Excels Help. Share Share this post on Digg Del.icio.us Technorati Twitter Regards, Sandeep You can post sample data using any one of the following ways: 1. Richard Schollar's HTML Maker 2. Excel Jeanie 3. Border Copy Paste Use code tags [CODE]'Your Code[/CODE] for posting codes. Reply With Quote Apr 29th, 2010,03:51 AM #3 Andrew Poulsom MrExcel MVPModerator Join Date Jul 2002 Posts 73,092 Re: Run time error 1004 when running macro in shared workbook? Some features aren't available in a shared workbook: http://office.microsoft.com/en-us/ex...010801033.aspx Share Share this post on Digg Del.icio.us Technorati Twitter Microsoft MVP - Excel Reply With Quote May 27th, 2010,03:44 AM #4 rich
Forum Microsoft Office Application Help - Excel Help forum Excel Programming / VBA / Macros shared workbook runtime error 1004 To get replies by our experts at nominal charges, follow this link to buy points and post your thread in our Commercial Services forum! Here is the FAQ
Excel Run Time Error 1004 Method Range Of Object _worksheet Failed
for this forum. + Reply to Thread Results 1 to 11 of 11 shared workbook runtime excel run time error 1004 method range of object _global failed error 1004 Thread Tools Show Printable Version Subscribe to this Thread… Rate This Thread Current Rating Excellent Good Average Bad run time error 1004 excel macro Terrible Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-28-2005,05:13 PM #1 Nigel View Profile View Forum Posts Forum Contributor Join Date 07-28-2005 Posts 126 shared workbook runtime error 1004 Hi I have a small excel http://www.mrexcel.com/forum/excel-questions/464869-run-time-error-1004-when-running-macro-shared-workbook.html estimate form which needs to be able to expand to accomodate extra information when required. When finished I simply print the form off and want to return the form back to its original size with all the entered data removed. I recorded a macro which deleted the form and pasted in its place a copy of the original stored on a different worksheet. Worked great untill I tried to share it.........now I get "run time error 1004" The way the worksheet http://www.excelforum.com/showthread.php?t=391122 is setup means I would rather not just delete the whole sheet and replace it with one stored as a template which is what the microsoft knowledge base suggests. If anybody has any ideas I would be grateful..........to date my ability to compile macros is limited to the "record" function but im happy to have a go if someone can point me in the right direction. Many thanks Register To Reply 07-29-2005,02:06 AM #2 Norman Jones Guest Re: shared workbook runtime error 1004 Hi Nigel, >The way the worksheet is > setup means I would rather not just delete the whole sheet and replace > it with one stored as a template which is what the microsoft knowledge > base suggests. If the template sheet (workbook?) shows the blank form exactly as you want it, the suggested approach would seem to present few problems. Why would this appoach not appeal? --- Regards, Norman "Nigel"
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the http://stackoverflow.com/questions/445519/how-do-i-avoid-run-time-error-when-a-worksheet-is-protected-in-ms-excel company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million http://www.textndata.com/forums/run-time-error-1004-shared-373239.html programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How do I avoid run-time error when a worksheet is protected in MS-Excel? up vote 7 down vote favorite 1 error 1004 The code snippet below changes the data validation state of a cell and runs when the Excel-2003 worksheet is unprotected. However, when I protect the work sheet the macro doesn't run and raises a run-time error Run-time error '-2147417848 (80010108)': Method 'Add' of object 'Validation' failed I have tried wrapping the code with Me.unprotect ... Me.protect But this does not work properly. So, how can I modify the code below to work (ie have time error 1004 the code modify the unlocked cell's validation) when the sheet is protected without the above run-time error? Update My original work book is an Excel 2003. I tested @eJames solution in Excel 2007 with the following definition for Workbook_Open Sub WorkBook_Open() Me.Worksheets("MainTable").Protect contents:=True, userinterfaceonly:=True End Sub The code still fails with the following run-time error when the worksheet is protected Run-time error '1004': Application-defined or object-defined error Thanks, Azim Code Snippet 'cell to add drop down validation list' dim myNamedRange as String dim modifyCell as Range modifyCell = ActiveCell.Offset(0,1) ' set list values based on some conditions not defined for brevitity' If myCondition then myNamedRange = "range1" Else myNamedRange = "range2" End If With modifyCell.Validation .Delete 'Run time error occurs on the next line' .Add Type:=xlValidateList, AlertStyle:=xlValidAltertStop, _ Operator:=xlBetween, Formula1:="=" & myNamedRange ... ' skipping more property setting code ' ... End With excel vba excel-vba share|improve this question edited Apr 1 '09 at 21:16 Lance Roberts 14.5k2384118 asked Jan 15 '09 at 3:14 Azim 5,82452849 possible duplicate of How to protect cells in Excel but allow these to be modified by VBA script –Jean-Francois Corbett Oct 31 '14 at 9:39 add a comment| 2 Answers 2 active oldest votes up vote 9 down vote accepted If I understand the question correctly, you will be th
Office 2010 / 2007 / 2003 Microsoft Excel Excel Troubleshooting Run time Error 1004, on shared workbook Ask a Question Sign up for Free 119 Experts currently online. Ask Questions for Free! Run time Error 1004, on shared workbook - Excel Troubleshooting Hello, I have an Excell workbook sent from another party which contains macros and vba code. I have to use it with other co-workers and I was trying to share the doent with the rest of the team. Unfortunately after we set the sharing option, we get this error : ... Results 1 to 3 of 3 LinkBack LinkBack URL About LinkBacks Bookmark & Share Add Thread to del.icio.usTweet this thread Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 10-28, 02:21 PM #1 Run time Error 1004, on shared workbook Hello, I have an Excell workbook sent from another party which contains macros and vba code. I have to use it with other co-workers and I was trying to share the doent with the rest of the team. Unfortunately after we set the sharing option, we get this error : Run-time Error 1004, Method 'Unprotect' of object '_Workshhet' failed. I looked in the code and found this reference to protect/unprotect method: Public Sub lockSheet() Dim activeSheet As Worksheet Set activeSheet = Application.ActiveWorkbook.activeSheet activeSheet.Unprotect (modMain.WsPw) activeSheet.EnableOutlining = True 'activeSheet.Protect Scenarios:=True, UserInterfaceOnly:=True activeSheet.Protect _ Password:=modMain.WsPw, _ userinterfaceonly:=True, _ AllowFormattingCells:=True, _ AllowFormattingColumns:=True, _ AllowFormattingRows:=True, _ AllowFiltering:=True End Sub Can anyone help? Thanks Roxana Roxana Reply With Quote 10-28, 07:01 PM #2 RE: Run time Error 1004, on shared workbook Hi, Shared workbooks have many issues, take a look at this site http://support.microsoft.com/kb/130560/en-us -- Thanks, Shane Devenshire "Roxana" wrote: ShaneDeve