How To Save File With Correct File Extension (XLS Or XLSX)
Mar 12, 2014
How can I save worksheet from existing workbook as a new workbook with extension .xls or .xlsx depending on the version of Excel on which the original was opened and no matter the extension of original?
My code that I was trying to create all above does not work, because even if I am using Excel 2007, 2010 or 2013 it will still be saving only as .xls.
What I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.
All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.
I saved my worksheet in vba .xlsx and for some reason, when I go to the folder that it's saved in and try to open the file I get an error message saying "excel cannot open the file 'PO Acks fo 09-20-2013.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
This is weird because I have another file that I save right before this that opens just fine without an error. Getting frustrating. When I go into the ~Users folder it shows as an excel file and saved as .xlsx.
I have just received an eMail from my accountant and here file name extension is .xlsx. I have never seen this before. Can someone tell me why the x on the end of the extension? . Also, when it opens, a Message Box is displayed: File Conversion in process.
VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.
I am running into an issue were a file may be saved as .xls or .xlsm instead, but I still need to have the macro open it. Is there a way to adjust the above code, or other code for that matter, that will allow my macro to open any of these extensions?
I am facing this error problem in my laptop. Error: Excel can't open the file (name).xlsx because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of file.
When every i am trying to open all the excel files are giving me this error. I try many software and change the extension. But no result. Same error message is coming. Really if its not fixed i will lose too much important data.
I have a sheet I am working on that was given to me by a supplier and for example the cell in A1 is '2008_world_soccer'. How do I add '.jar' to the end of the filename bearing in mind the filenames are not the same length in each cell. So it would then read '2008_world_soccer.jar' or ''2008_world_soccer_GB_test.jar' etc. Any ideas that would saving me having to edit and type .jar at the end everytime for over a thousand records?
I have attempted to alter this example to simply check if the cells are not blank by replacing the "X" with "<>", but I get errors in the SMALL function--it looks like the IF statement is just returning an array with all of the values set to FALSE, and none of the values in the array call out a location of the next filled cell.
How could you alter your fixed XLSX file to check for non-blank cells instead of "X" specifically?
When I prepare a file with macro's (to be used by other people), I save this file as a template with macro's with the extension *.xltm (template with macro). Therefore no one can overwrite my file. These other people can open this template (e.g. double-click, but not file-open). But when these people save this file, Excel automatically saves it as a normal Excel-file with the extension *.xlsx. Ok, a message is seen after pressing <enter> or clicking Save, but does normal users know, what they have to do then?
If I'm making a template with macro's, I want Excel to have this file saved as a file with macro's. Whatever did I make a file with macro's for? Is this a bug or is it done on purpose?
creating a macro that will inport file exention which has WK4 , i have lotus notes at work i have exported email file to drive U: , i require a macro to pick this file up and export to Sheet Group_Mailbox. The range is A9
Description:The chart shown in the file is a picture using the Camera Tool. The real chart is in the worksheet "Chts". When using the dropdown & radio button, the chart is supposed to change accordingly.
Problem 1:The picture from the camera tool seem to be blurry. The lines also seem thicker. Any rectifications for this?
Problem 2:If I save this file as "xlsx", the chart will not change dynamically when the dropdown is changed.
Apparently my program quits after i try to open an excel file. If you open the file manually you get an error upon opening the file...something like this:
"File you are tyring to open is in a different format than specified by the file extension".
The problem is i am using an excel macro using VBA and once the file is opened the VBA execution quits.
The excel file turns out to be an xml file which excel can open the file and have the VBA continue running if i RENAME the file with an "xlsx" extension. The problem is that i cant ask the user to rename the file.........how do i get VBA to open the file without an issue?
Has anyone got the add in code? I have my own custom menu bar on my excel. But every time i want to add a new link i must go into the code and manually add the file name extension and relevant VBA code. Is there a method of just entering the file extension in a cell range and excel will automatically update or pick up or link from this location?
I am attempting to write a macro that will open every file in a given folder, then save the files with a new file names while keeping the original file extension. The files I'm opening with excel have file extensions of ".VA", ".TOU", and ".KVA". The new file names I want to save the files with are contained in cell A1.
An example would be: The excel macro opens file "R003890.TOU" The macro assigns a the value in cell "A1" (B1040) to a variable The macro assigns the file extension (.TOU) to a variable The macro saves the file as file name variable and file extension variable (B1040.TOU)
I'm trying to insure that when a file name is inputted into cell "DA7" that the string ends with a ".xls" extension. I'm using "DA7" as a target and have written the following code. When executed nothing happens.
If Target.Address = "DA7" Then Dim ta As String ta = Target.Value If Right(ta, 4) <> ".xls" Then MsgBox "The file name must end with a '.xls' extention" Target.ClearContents End If End If
I have a folder containing 1000's of files. All the files end in .txt (for example test.txt) but are actually excel files. When I go to open the files with excel I get the following warning:
The file you are trying to open is in a different format than specified by the file's extension. Verify that the file is not corrupt and from a trusted source before opening the file. Do you want to continue?
I click "yes" and it opens fine as an excel file.
I want to merge all these files one after another into one file.
I am trying to open a website, then for excel to download the csv file, then for it to save it in a specific folder under a specific name and file format (excel).
I am successful at opening the website with the following code, but how to do the rest.
Sub Searchez() Dim IE As Object Set IE = CreateObject("InternetExplorer.Application") IE.Navigate "http://quote.morningstar.ca/Quicktakes/stock/keyratios.aspx?t=clwr®ion=USA&culture=en-CA&ops=clear" 'load web page google.com IE.Visible = True While IE.Busy DoEvents Wend
I have a spreadsheet where I want to require certain fields to be completed then I want to have that file auto emailed. I have learned that I do need to have the file saved before sending otherwise the data will not appear in the email, so with this I want to have the file temporarily saved emailed then the temp file deleted.
Here is the code I have so far but it errors on the blue text, I did change the TempFileName from = "Copy of " & wb1.Name & " " & Format(Now, "dd-mmm-yy h-mm-ss") to = [C16] & "_" & [B6] & "_" & [D6]
Private Sub CommandButton1_Click() If Range("B6").Value = "" Or _ Range("d6").Value = "" Or _ Range("f6").Value = "" Or _ Range("E9").Value = "" Or _
A co-worker of mine is exporting files from Quickpen as excel files, but every time he names the files with any Uppercase letters in the files name, they are automatically changing to all lower case. Even when he tries to rename the files, they will not stay with any uppercase letters....I have searched all over and cannot find a solution. If he sends ME the file, I can open it in excel and save it with any cases.
I have a Workbook that already has a macro in it that will generate multiple sheets based on certain criteria.
For each of these newly generated sheets (numbered 1-6 in the attached example), I need to be able save each of them to a PDF file based on a unique name contained in a certain cell (in this case, each named is referenced in cell Q1 of each sheet). As such, I should end up with 6 pdfs based on the attached sample files.
The PDFs would ideally need to be landscaped and should be just 1 page per sheet.
In my attached sample workbook, you'll notice that I have a "PracticePrint" macro that doesn't quite get the job done. One other criteria involves not printing any sheet with the characters "1010" in it (my PracticePrint macro is setup to do that, but it fails to do much else).
I have a macro which successully saves a worksheet as new file to another file path....(below)...but I can't figure out how to close this new file and return to the original file...
Dim myPath As String, fName As String myPath = Sheets("Date").Range("C8").Text fName = Sheets("Date").Range("C9").Text Sheets("Sage CSV File").Copy With ActiveWorkbook .SaveAs Filename:=myPath & fName End With'