excel vba error 1004 document not saved Crozier Virginia

Address 9704 Olde Milbrooke Way, Glen Allen, VA 23060
Phone (804) 965-0597
Website Link http://lev-1.com

excel vba error 1004 document not saved Crozier, Virginia

Register Help Remember Me? According to the help, the syntax is: expression.SaveAs(FileName,...) Where expression identifies the workbook you want to save (not the file to save it in). Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily. Digital Diversity Can Communism become a stable economic strategy?

Ozgrid is Not Associated With Microsoft. If you used my template code then Excel will be left displaying the 'Waiting...' message when the procedure finishes after at least one error was trapped. You've mentioned both. So, what I want to be able to do is put that very same code (that clears the dirty flag when the document is opened) in the Personal.xls file and have

Short and simple. Ditto on what Killer42 said. I thought of a on error goto, but I'm not quite sure how to build the pause, the repeat and error message after 5 tries. LinkBack Thread Tools Display Modes #1 01-19-2014, 08:53 AM doctor_who12 Windows 8 Office 2013 Novice Join Date: Jan 2014 Posts: 1 Run-time error '1004': Document not saved.

Thanks in advance, Eitan Ask Your Own Question Runtime Error 1004 Method Save Of Object _workbook Failed - Excel Excel Forum I have a question. Jul 28 '13 #5 reply Expert Mod 2.5K+ P: 4,994 zmbd Really making this way too complicated: rahulwagh: The function DIR() should NEVER be used in this fashion. How? Jen Ask Your Own Question Error 1004 Trying To Save Active Workbook - Excel Excel Forum I have a macro that runs fine using Excel 2007 on Windows XP, but with

The error is a "Run-time Error 13, Error Mismatch" The save and close code I'm using is: Code: (Other code up here) 'Saves worksheet ActiveWorkbook.Save MsgBox "Data Imported OK & Workbook I've pasted the code below and highlighted in red the line of code that is resulting in the error. I found some similar, but nothing that pertained specifically to my problem. But also, you will need to find the correct index for the Workbook.

Sub SaveFileAs() Dim file As String file = "ClientData_" & Format(Now, "ddmmmyy") & ".xls" ActiveWorkbook.SaveAs file End Sub If there is already an existing file I get the standard Windows warning Try The Command Again Later - Excel Excel Forum I encounter this error when I try to open one excel file that has a shared workbook. Sec ... Exploded Suffixes Is intelligence the "natural" product of evolution?

However, when I use LockXLS protection software to protect the file, it turns it into an exe file. The document may be open, or an error may have been encountered when saving. I updated the ODBC configuration to point to the correct partition, but then the macro throws an error at the line Selection.QueryTable.Refresh BackgroundQuery:=False I get a Run-time error '1004' General ODBC The Macro allows you to send the most Open a Word Document from Excel - This Microsoft Excel macro will open a Microsoft Word document from excel.

Document not saved." when exporting to PDF with VBA Maybe the unqualified Cells property is the cause of the error. We ask that each thread contain only one question. Jul 24 '13 #3 reply P: 29 rahulwagh Expression is the object of Excel. Unfortunately Debug is greyed out on the error message therefore I only get the option to click end (or help which wasnt helpful).

The other option would be if there was a macro that checked for a file already being open with the same name and if so asked them to close it, before Helpful Excel Macros Excel Macro to Save a Specific Worksheet as a New File - This Excel Macro allows you to save a specific worksheet within the Excel Workbook to its When this macro is run I get an error message highlighting the BeforeClose private sub. Why are unsigned numbers implemented?

I've been trying with code such as: ThisWorkbook.Saved = True Application.ThisWorkbook.Saved = True Workbooks(1).Saved = True ActiveWorkbook.Saved = True Dim myworkbook As Object Set myworkbook = Excel.Application.ActiveWorkbook myworkbook.Saved = True But Code: If ActiveSheet.UsedRange.Cells.Count > 1 Then With ActiveSheet .ExportasFixedFormat... ... However if I programatically change the name of e.g."AutoShape10593" to e.g. "helpShape1", it does give the first message box "clicked by helpShape1". What's puzzeling though is when I get the error, I press debug and then run macro, and it does it and continues until the next error which could be a while

How to handle a senior developer diva who seems unaware that his skills are obsolete? I assign a macro to the object which does the following Public Sub processClick() Dim sr As Shape clickPlace = Application.Caller MsgBox ("clicked by " + clickPlace) Set aSheet = Worksheets("coverSheet") Password Register FAQ Today's Posts Search Search Forums Show Threads Show Posts Tag Search Advanced Search Go to Page... Help ! [ FWIW if I change the code slightly .e.g REPLACE THE LINE Set sr = aSheet.Shapes(clickPlace) WITH Set myRange = aSheet.Shapes.Range(clickPlace) I get a "runtime error '1004' The item

Jamal NUMAN Word 1 04-14-2011 04:27 AM Word: The document 'Filename' caused a serious error the last time ... Document not saved." when exporting to PDF with VBA If there are no cells with data in the ActiveSheet then there is nothing to 'print' into the PDF. Connect with top rated Experts 10 Experts available now in Live! Basically, the error message mentioned in the title comes up when I try to increment by one a cell in my spreadsheet that I have designated as a counter in my

Thank you Register To Reply + Reply to Thread « Previous Thread | Next Thread » Thread Information Users Browsing this Thread There are currently 1 users browsing this thread. (0 Alan Google is your friend Click on the star if you think someone helped you Did you debug your code first? The standard layout for this method is: ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF FileName:=“NamedFile.pdf” Go to Solution 4 Comments LVL 18 Overall: Level 18 MS Excel 10 Message Accepted Solution by:Steven Harris2012-10-08 Generally speaking, I can't post the workbook because of confidential info.

What is even more confusing is that the macro does produce my final PDF (with the file name in the format CellRef_CellRef); it just fails to delete sheet 1 after doing Would this code conflict if I have 2 copies of the same workbook up at the same time and try to run this code in one? I can't see why it would have an issue recognising Sheet1 in order to delete it, if Sheets("Sheet1").Select did not return an error earlier... Comment Submit Your Comment By clicking you are agreeing to Experts Exchange's Terms of Use.

Document not saved." when exporting to PDF with VBA When I removed Code: Sheets("Sheet1").Delete I didn't get an error (without suppressing the error) -- g Share Share this post on Digg I'll copy it in! What happened on my excel file?