Home > Vba Error > Vba Error 400 Workbooks Open

Vba Error 400 Workbooks Open

Or upload a sample file by chance? I've been at this a couple of days and am slowly coming up to speed, but need help, both with the code, and suggestions on how to better debug the code. Similar Threads - Solved error running Credential Manager error in Windows 10 NickWagner, Dec 6, 2016 at 12:51 PM, in forum: Business Applications Replies: 1 Views: 52 DaveA Dec 6, 2016 It often occurs even when I've left machine unattended for hours. http://sortoutlookemail.com/vba-error/vba-error-20-resume-without-error.html

PS I don't think there's a problem with GetOpenAsFileName, if there was that's where the error would be. I'm not that great with arrays, but I'm fairly sure that you need another variable in t ipisors Dec 11 2012, 01:09 PM In the meantime, I'm fairly sure this will This site is completely free -- paid for by advertisers and donations. Close and re-open Excel twice. http://stackoverflow.com/questions/24843401/excel-vba-getting-error-400-on-workbooks-open

Here is the code:!--c1-->CODESub process_file(read_filename As String)Dim pull_string As Stringpull_string = ThisWorkbook.Path & "\" & read_filenameWorkbooks.Open filename:=pull_stringEnd SubI've checked and the file exists. the workbooks are all named like so: date_#_title.xls where date and title are fixed and # ascends from 0000 up to 9999 is there anyway i can write into the code Forum Board FAQ Forum Rules Guidelines for Forum Use FAQ Forum Actions Mark Forums Read Quick Links Today's Posts Search New Posts Zero Reply Posts Subscribed Threads MrExcel Consulting Advanced Search My current problem is ensuring that the input sheets are already open before recalculations are don on the main spreadsheet, otherwise I get #VALUE errors all over the display.

Advertisement Tech Support Guy Home Forums > Software & Hardware > Business Applications > Home Forums Forums Quick Links Search Forums Recent Posts Members Members Quick Links Notable Members Current Visitors It still asks me whether I want to overwrite. Code: Const pathPattern As String = "C:\*.xls*" fileName = Dir(pathPattern) Do While fileName "" Set wb = Workbooks.Open(fileName) With wb.Worksheets(1) 'Do something End With wb.SaveAs fileName:=wb.Path & "\" & fileName, FileFormat:=xlCSV, Feynman Diagrams: Ugly u-channel Is there a directory equivalent of /dev/null in Linux?

that's nonsense, isn't it? I have emailed the files to another computer and it still won't open. Reply With Quote 05-16-2007,05:54 AM #4 Charlize View Profile View Forum Posts View Blog Entries View Articles VBAX Master Joined Jul 2006 Location Belgium Posts 1,278 Location Revised code, hopefully this Can you set a breakpoint on the first line of code of the sub that calls it, so that it breaks, then press F8 in order to see which line of

Unhiding it allows the macro to work, but is there a way to do this without unhiding it? 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 Hybrid Mode Is it legal to mortgage a property twice or more? Loading...

Before I decided to write this post, I had a look trying to google my stupid error, but I couldn't find anything that looks exactly like my issue. http://www.excelforum.com/showthread.php?t=331596 unfortunatly I can't just tell excel to change the format because once it is open it thinks the date is the 1st of October rather than 10th of January. Thanks -- JoeBo Register To Reply 01-01-2005,09:06 AM #2 JoeBo Guest RE: error 400 Found the answer. Im sure this is a very simple fix Matt Ask Your Own Question Vba Code To Open An Excel File Only If Not Already Open - Excel Excel Forum Good morning

Advertisement Recent Posts Magician required to rescue an... navigate here However when I run the code, I get an error "Visual Basic 400" Please can you tell me why? Sub smiley_face() 'macro to open all files within a folder and ipisors Dec 11 2012, 02:19 PM i didn't catch the answer to my question about which code you're using now - i assume you're not using your original code, wasn't it You may have to register before you can post: click the register link above to proceed.

S. I'll go with this and forget about hiding the one page. Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Oct 2nd, 2014,03:57 PM #6 hugohonda New Member Join Date Oct 2014 Location Montreal Posts 10 Re: Error 400 Check This Out asked 2 years ago viewed 1997 times Related 1Show Excel 2007 Ribbon in XLS file using Excel VBA-3Error 400, 1004 in VBA-Excel0VBA Excel: Error 400 on Cells.Value2Capitalization issue with Workbooks.Open using

Thanks for reading my post! thanks! CONTINUE READING Message Author Comment by:tajinderpal ID: 247618802009-07-02 It does not tell me what line the error is as.

Minimalist posters 2 - Can you find the movie?

Code: strDIR2 = "Z:\dspotts\Tulsa Shipping\OLD DATA and Backups\Real old data\Really Big List.xlsx" strWB2 = "Really Big List.xlsx" If Workbooks(strWB2) Is Nothing Then Workbooks.Open (strDIR2) End If However, this code is not thanks Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Oct 2nd, 2014,03:52 PM #4 Norie Board Regular Join Date Apr 2004 Location Stirling Posts 70,509 Re: Error CONTINUE READING Join & Write a Comment Already a member? It's not getting any further.h, also, some of the files have spaces in their names.

exerguy, Dec 4, 2008 #14 Sponsor This thread has been Locked and is not open to further replies. Is this because the I am not opening > the file with read write permissions? > Anyone help with this. > Thanks > -- > JoeBo Register To Reply 04-19-2009,09:56 AM Count the Errors in a Range in Excel How to count the number of errors in a range in Excel; also, how to count the occurrence of a specific error. http://sortoutlookemail.com/vba-error/vba-error-handling.html Reply With Quote Oct 2nd, 2014,04:04 PM #9 hugohonda New Member Join Date Oct 2014 Location Montreal Posts 10 Re: Error 400 on Workbooks.Open yep, the file has the UNC path...i

Register Help Remember Me? Portal Forum FAQ Calendar Forum Actions Mark Forums Read Quick Links View Site Leaders Knowledgebase Articles Blogs Resources Consulting Services Training PayPal Donation Advanced Search Forum So I see this: Set RngH = etc. If the Period_TB.xlsx workbook is already open, the assignment to Period works fine. Join our community for more solutions or to ask questions.

here's a snippet of my code. fail to open the spreadsheet, but drop down to the next statement. Here is the FAQ for this forum. Let us connect computers Resources Excel problems solved by our add-Ins Excel and PC tips Excel and Office newsletters Excel and Office user groups Excel and Office training Links to other

If the worksheet is hidden you can either skip it completely like I've done in the code below or you can modify it to unhide the sheet first, process it, and The whole sub/section wherein the error is triggered: Sub LoadOldFiles(OpenTheFileAddress) Application.ScreenUpdating = False Application.DisplayAlerts = False Dim wb As Workbook Set wb = Workbooks.Open(OpenTheFileAddress, corruptload:=xlRepairFile) <---- ERROR If wb.Sheets(1).UsedRange.Rows.Count > 1 I have backups but once excel refuses to open the document, I get the same message trying to open the backups.