Excel Macro Visual Basic Error 400
Contents |
Data add-ins Downloadable macro books Specialty add-ins Time Saving add-ins Our favorites Add-in Collections Productivity Suite Accounting Collection Business Analysis Collection Charting Collection Data Collection Macro Book Collection Risk Analysis Collection Time Saving Collection Software Download information Download purchased software excel macro visual basic tutorial Add-in improvements and upgrades Trial verisions Support Support How to contact us Top support questions microsoft excel macro visual basic What to do if add-in tabs or buttons do not appear Money back guarantee Ordering FAQ's Product FAQ's How to open and use excel macro visual basic examples our add-ins How to repair Microsoft Excel COM add-ins and why and how to remove How to stop Microsoft Excel From crashing Need more help? Let us connect computers Resources Excel problems solved by our add-Ins Excel and
Excel Macro Visual Basic Tutorial Pdf
PC tips Excel and Office newsletters Excel and Office user groups Excel and Office training Links to other Excel sites Excel operating problems and solutions Company About Add-ins.com LLC How to contact us Policies Affiliate program License agreement View Cart Quantity Discounts Money back guarantee Microsoft Visual Basic Error 400 Some user will get a a dialog titled Microsoft Visual Basic and it contains only the number 400, like the following dialog: For users of macro visual basic excel 2010 our software, this error is typically caused by having the add-in file for the Spreadsheet Assistant for Excel 2003 installed as in add-in in Excel 2007 or Excel 2010. The cure is to un-install it and install the correct file. Click File or Office Button, Options, Add-ins, GO. Uncheck Spreadsheet Assistant. Click Browse, go to C:\program files (x86)\add-ins and select Spreadsheet Assistant 2007-2013.xla. If you are not using our software and get the above message, it means that your code is referring to something that does not exist or no longer exists. The cure is is to step through your code line by line until you find the offending statement. From it you will hopefully get the clue to solve. It could be referring to a variable that had been previously set to a range and then the workbook closed. Or trying to run a command in a workbook that does not exist (very difficult to do!) The cure for our users of the Spreadsheet Assistant who get a Microsoft Visual Basic 400 dialog is to do the following: Excel 2007: Open, click the round Office button, Excel Options, Add-ins, and Go (with manage excel addins selected) Excel 2010 Open, Click File, Options, Add-ins, and Go (with manage excel addins selected) both: Unclick the Spreadsheet Assistant in the Add-in dialog Do OK's and close and re-open Excel
Forums Excel Questions Visual Basic error: 400 Results 1 to 2 of 2 Visual Basic error: 400This is a discussion excel formula visual basic on Visual Basic error: 400 within the Excel Questions forums, part of
Excel Macro Java
the Question Forums category; Hi I have a macro which had been working fine, which had the
Writing A Macro For Excel
following code: With Range("Contact") .Locked = False ... LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread https://www.add-ins.com/support/microsoft-visual-basis-error-400.htm Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 15th, 2010,05:32 PM #1 peejay Board Regular Join Date Jul 2003 Location Sydney Posts 53 Visual Basic error: 400 Hi I have a macro which had been working fine, which had the following code: With Range("Contact") .Locked = False .Copy http://www.mrexcel.com/forum/excel-questions/481544-visual-basic-error-400-a.html .PasteSpecial Paste:=xlPasteValues .Interior.ColorIndex = 36 End With where the range "Contact" is on the active sheet, and the active sheet is unprotected. For some reason, the macro started throwing up an error box, titled 'Microsoft Visual Basic', showing only '400' (with OK & Help buttons). I've fixed the problem, changing the 1st two lines to the following: Range("Contact").Select With Selection but, I'd be interested in understanding why this has occurred. Thanks, PJ Share Share this post on Digg Del.icio.us Technorati Twitter cheers, PJ Reply With Quote Jul 16th, 2010,02:11 PM #2 xenou MrExcel MVPModerator Join Date Mar 2007 Location Clev. OH, USA Posts 14,852 Re: Visual Basic error: 400 400 errors are, by definition, unspecified and (for all intents and purposes) mysterious. Your code should not fail here, as far as I can tell. You may even find that changing it back, it will now work again. The only way I know of to troubleshoot 400 errors is to step through the code line by line - a
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API https://social.msdn.microsoft.com/Forums/office/en-US/69f3c0da-43ec-4760-abef-58155fd3ebfb/vba-macro-execution-fails-with-error-400?forum=exceldev Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related http://p2p.wrox.com/excel-vba/52071-what-error-400-a.html threads Remove From My Forums Answered by: VBA: Macro execution fails with Error 400 Microsoft Office for Developers > Excel for Developers Question 0 Sign in to vote Excel Version: 2010 Business Pro visual basic Problem: I have a macro that is getting to a certain line of code then encountering an Error 400 ("Form Already Displayed; Can't Show Modally"; don't really understand what this error is). I am including the code for the macro below.You will note in the code below, where the macro bombs out. I didn't bother including code for any of the othercalled macros since they don't seem to macro visual basic be the problem. Any suggestions would be welcome. The Msgboxes are for debugging only. Regards, ...bob sutor PageBreaksRows_Button MACRO CODE: Public Sub PageBreakRows_Button() 'On Error GoTo ErrorHandler1: 'TURN OFF FEATURES TO SPEED UP MACRO PROCESSING: If c = 0 Then _ PerformanceOptionsOFF 'SETACTIVE SHEETNAME Dim strPageBreaksSheetName As String Dim strReferenceSheetName As String Dim intErrorCount As Integer strPageBreaksSheetName = ActiveSheet.Name strReferenceSheetName = "5005-PageBreaks" vrZoom = 75 intPaperSize = 1 ' 1 = Letter, 17 = 11x17 intOrientation = 1 ' 1= Portrait, 2 = Landscape 'SET SOURCE SHEET STATUS blnSourceSheetVisibleStatus = ActiveSheet.Visible ActiveSheet.Visible = True blnSourceSheetProtectStatus = ActiveSheet.ProtectContents ActiveSheet.Unprotect Password:=strPassword 100 Answer = MsgBox("Do you want to proceed with resetting all page breaks on active sheet?", vbOKCancel) Select Case Answer Case vbOK strPageBreaksAddRemove = "Add" ActiveSheet.ResetAllPageBreaks 'Reset print parameters after page breaks reset Sheets(strPageBreaksSheetName).PageSetup.Zoom = vrZoom Sheets(strPageBreaksSheetName).PageSetup.Orientation = intOrientation Sheets(strPageBreaksSheetName).PageSetup.PaperSize = intPaperSize Case vbCancel GoTo 500 End Select 'CHECK TO SEE IF NECESSARY RANGE NAMES exist, if not setup If Not NameExists_ActiveSheet("PageBreaksActiveSheetSetup") Then MsgBox "PageBreaksActiveSheetSetup missing on 5005-P
Unanswered Topics Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA What Is Error 400? User Name Remember Me? Password Reminder Password Register Register | FAQ | Members List | Calendar | Today's Posts | Search Excel VBA Discuss using VBA for Excel programming. Search Forums Show Threads Show Posts Advanced Search Find All Thanked Posts Go to Page... Welcome to the p2p.wrox.com Forums. You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free . Thread Tools Display Modes #1 (permalink) December 29th, 2006, 01:27 PM RollingWoodFarm Authorized User Join Date: Jul 2006 Location: Kalamazoo, MI, USA. Posts: 27 Thanks: 0 Thanked 0 Times in 0 Posts What Is Error 400? I am adding a pop-up calendar to some VB coding. I've already done the add-in through Excel. When I select it in References in VB, I get a Visual Basic error that just says 400 in the message box. There is an image of a red button with an "X" on it. My only selections are "OK" and "HELP". If I select "HELP", I just get a blank page in a new window. Can anyone tell me what this error means? Thanks. Terry #2 (permalink) December 29th, 2006, 11:30 PM UnderTheBridge Registered User Join Date: Dec 2006 Location: , , USA. Posts: 4 Thanks: 0 Thanked 0 Times in 0 Posts From what I have been able to gather, the 400 is a generic illegal operation code that could apply to just about anything. When you say Quote: quote:When I select it in References in VB, I get a Visual Basic error I'm not quite sure what you mean exactly. Do you mean that when you run the code you get the error? What happens when you step through the code? Does that line of code point you to something that you might be overlooking (malformed function, invalid offset, etc)? You might want to paste the code here - would make it easier to visualize. I sympathize on the stupid error message. You would think there wo