I have some daily text files in a folder (so about 30 of them each month), which in the end of month, I need to open them up in excel, format them so that I can use the information for my analysis.
I would like to create a macro, to quickly open them all up at once and save them each individually in .xls or .xlsm format.
I am new to VBA and after some research online, I was able to have the files open with the following code. but now I don't know how to proceed further to save them one by one with the same name but in .xls or .xlsm format.
Sub Opentxtfiles() Dim MyFolder As String Dim myfile As String
I have an expense report, which was originally done in Excel 2003. It still prompts users to open as read only however if they select no, they are not prompted for the password, and it has allowed them to save, so when the next person opens it, they have the previous person's report instead of the clean workbook. I have tried everything to put a password onto it. I know this is really basic stuff, but maybe I am missing a step? I want the end user to be able to make all the changes they want in read only mode and then do a save as, but if the select No when prompted "Open as Read-only?" they should have to put a password in.
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 have some excel files which should be saved in Excel 97-2003 Workbook format . I am trying to write vba code for that i am struggling at starting . problem is i have 6 excel files which should be saved as Excel 97-2003 Workbook format i don't know how i give 6 files path to code .
I enter 13 digit number in a cell, when I save my Worksheet in CSV format the number is changed.
Example: I enter 9328627000014 (this is a barcode) After saving this file the number is displayed in the Formula Bar as 9328630000000 and in the Cell it show up as 9.33E+12 When I go to Format Cells, this cell is selected as Scientific. When I change it to Number, after saving it again it returns back to scientific with the old display. Also when I enter 2 digit number in another cell in another column and I choose to be displayed as number with 2 decimal places, after saving the file it returns back as General format. When I am saving this file as CSV a window pops up with a warning that my file may contain features that are not compatible with CSV. I can not choose text format in the cell because it is a datafeed and it has to be read correctly as number.
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.
When selecting multiple excel files in explorer, you can right click and choose to print the selected documents. All documents gets opened and printed but the files stay open and you have to manually click on YES or NO to save the changes.
Is there a way not to see this window appear. So documents get opened and printed and closes itself without asking anything. Maybe it can be done with an option in the preferences. I'm not sure.
By the way the documents where created with excel vba just in case it's relevant. Also the version of Excel is an older version, I think it was Excel XP or 2002/2003.
How to save a file, with file- name. but the directory is to be read in worksheet "towns" in Cell1 (brussels) and filename in worksheet "names" in cell B2 (i.e. winter), so it saves to c:russelswinter.txt as a wordpad or kladblok txt file, that keeps a number, so each time we push a button "go back from worksheet names to worksheet towns" the "number" that is saved in the txt document goes up by value +1. In Flemisch, the "old" code goes as follows, and saves the number in the txt file Factuurnummer7.txt. But I want that the file name (here: FactuurNummer7) can be a variable text issue, which has to be read - as already noticed - in cell B2 (with the word WINTER). So the are 2 worksheets: towns, ans names
pad$ = Application.DefaultFilePath 'controle = Dir(pad$ + "FactuurNummer7.txt") 'If controle = "" Then GoTo EerstAanmaken 'Open pad$ + "Factuurnummer7.txt" For Input As #10 'Input #10, Nummer1 'Close #10......................
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.
Every day I create many Excel reports that I manually save as PDFs for distribution to my stakeholders. I'd like to automate this process using a macro. I've seen the following code online and have attempted to use it, but receive an error in the Dim MyPDF line of code indicating that the user-defined type is not defined.
I'm using Excel 2003 and Acrobat Distiller 8. I have no problem creating PDFs manually
Code: Sub Create_PDF() Dim tempPDFFileName As String Dim tempPSFileName As String Dim tempPDFRawFileName As String
- I have excel file with data I need - I have fixed txt(html) template that i need to integrate Excel information into - Final result that I want to achieve is saved .txt(html) file with combination of fixed information (text) and data from excel cells.
I need to writing a VBA code for each of above (integrating text & cells, saving results as text)
Now, I want every time to take the part of the text says "TER:something..." (part of which is date, but not every time with the known format dd-mm-yyyy, as you see here is yyy, followed by something else, with parenthesis here and maybe more data) and copy it in a new cell..., e.g:CO Column, same Row...
Above and every field which by the way is formatted as General (and it is text mainly) are made by merging older excel fields where data laid here and there, that's why you see the commas...with the method of a module with the following code:
Function MyMerge(Rng As Range) For Each Cell In Rng Temp = Temp & Cell.Value & ", " Next Cell Temp = Mid(Temp, 1, Len(Temp) - 2) MyMerge = Temp End Function
Note1:Records with the above string (TER:dd-mm-yyy) are 771 from 6469. Note2: As an alternative solution I can see an extraction of the TER:dd-mm-yyy string and the copy in a new place, like the:CO Column, same Row...
I have a question regarding the properties of an Excel file (.xls 2003). I can change them all (as indicated on Microsoft support website) expect the name of the last person who recorded the document (File ==> Properties==>Stat.)
I have created a macro in excel 2010 which enable the file to save (extract) data into separate location and name. The vba code for macro is as follows: Question: How can I save this workbook with reference to the value containing in cell B2? (it is named temporary now - as defined in the code)
I have a excel 2003 template that loads a csv file and create a graph.What I am trying to do is remove the Workbook_open macro after it has been run so when they save the file it will not save the macro in the new file.
How do I create a hyperlink in an Excel 2003 file that will open a PDF file with Reader?
I have an Excel file of hundreds of Customer names and invoice numbers. I have a directory of PDF files. The name of each PDF file is the customer name, a space, and the invoice number. I should be able to have a column in the Excel file that contains a formula that creates a hyperlink to open the corresponding PDF file.
I used the HYPERLINK function and built the path and file by concatenating information. When I click the hyperlink, I keep getting an Excel error: Cannot open the specified file.
Do you think this problem is something of my own doing or some "undocumented feature" in Excel?
Date: 17/09/2013 KO: 19:45 Ref: B Malone Att: 7,574 extraction of text from the above text string which is say in A1. What l need is for Date to go in A2, KO in B2, Ref in C2, & Att in D2. I'm using Excel 2003
Is there a way to disable the Convert button on the File menu and also to limit the Save As file types? I have a workbook that I maintain in Office 2003 that gets filled out by customers and returned. When a user with a newer version of Excel converts the file, it doesn't function properly when I go open it. I believe the conversion issue has to do with Active X Controls, but I'm using them to do some things that won't work with Forms Controls, so replacing them would be a last resort. Also, upgrading Office isn't an option at this point.
What i am trying to do is in 1 workbook (labled as Book1 literally), it needs to copy the sheets out of every .xls file there is in a single directory, we'll call C:MyFolderMySubFolder. There can be anywhere between 1 and 366 files in this particular folder and I need all the sheets in each file labled 'CC' copy that entire sheet, paste that sheet to Book1, go back to that file it was copied from, close it (saving changes is ok), then move on to the next file.. and the next file... and so forth
While pasting into book1, I need each WS copied from each file to paste to a new worksheet in book1 rather than combining them into 1 or overwriting, and lable each of those sheets the file name of which the sheet came from...
The names are in sequence. All files in the folder will be labled as a date such as "9-6-12" so the sheet name in book1 would be named 9-6-12. (so there may result in 366 new worksheets to book1)
Could any Excel wiz out there tell me whether the following is possible, and if so what would be the VB code to do it?
I would like a macro that will save the contents of cell A2 in a text file, with file name from cell A1, then move the cursor down to the next row, and repeat the process until reaching the last row of data.
The end result would be a stack of text files, each containing the data from a single cell in the spreadsheet.
e.g. 001.txt (containing the contents of cell A2) 002.txt (containing the contents of cell B2) 003.txt (containing the contents of cell C2) ...etc.
This is for a multi lingual dictionary so the text files would have to be unicode as well.