Saving All The Sheets As .txt
Dec 31, 2009The aim of the macro is to save all the sheets in .txt files named as the original sheets.
View 3 RepliesThe aim of the macro is to save all the sheets in .txt files named as the original sheets.
View 3 RepliesI don't do a lot of VBA, so this should be really simple, but I'm going to defer to the experts! Thank you! I often need to group tabs in Excel 2007, but oh the horror if it saves while those tabs are grouped and someone opens it up and starts typing! Is there a piece of code I can enter that will ungroup all the tabs before the file saves?
View 9 Replies View Relatedhow to save my macros to a spread sheet? It seems every time I close my sheet(s) (after saving???) and come back to them later, my macros are gone??
I would like to have all my worksheets except one hidden when a user saves the workbook. I can do it with a macro but not all users use the macro to save the document and sheets are left visible.
View 3 Replies View RelatedI need to be able to protect the sheets in this workbook but then I need them to be unprotected when I click the Save File As button and then have them saved again whenever the file is opened back up.
I have a problem with value's from a userform saving in the sheets as date's. In the userform i fill out e.g. 14-4-12
With the code beneath i save them in mij sheet.
Code:
Sheets("Containerlabels Afdrukken").Range("D6") = TextBox2.Value
When i save this in my sheet, it is saved as text. While i want to calculate with this value as a date, i would like to know how i can save this value as a date.
I have an Excel file with multiple sheets (over 100). I want to save them each as an individual PDF, with different (but similar format) names.
As an example, I want each PDF to be be called "Date Name" (i.e. "1-8-2014 Sarah", and next one will be "1-8-2014 Beth", etc.)
Is there a way to do this all at once, instead of my having to manually save each one? Is there a way for me to set it so that the title lists the date and then, for example, whatever is listed in A1 (which will be the name)?
One other question is that because I get this report from someone else who generates it, the way the file is formatted on my computer is that the print area is set at too small, so if I convert immediately to PDF, everything gets messed up. I have to manually make the print area bigger so that the PDF version encompasses everything on one page. Right now I've been manually adjusting the print area page by page - any way to do this all at once?
I'm actually using a macro that saves all the sheets from a workbook in new separate files, and save them in a specified folder.
Code:
Sub Estrazione_Schede()
Dim n As Long
Dim myNome As String
Dim myPath As String
myPath = "D:path"
[Code] ......
What I'm trying to do is that, instead of saving all the sheets in one folder, the macro would save them in different folders, depending on specific values in a specific cell of each sheet. I tried to modify the macro like this, but it doesn't seem to work properly:
Code:
Dim n As Long
Dim myNome As String
Dim myPathOne As String
Dim myPathTwo As String
myPathOne = "D:pathOne"
[Code] .....
With this code the macro ends up to check the condition only in the first sheet and then it copies all the sheet in the same folder.
I load an text file into an excel sheet and after some eventually changes I save (overwrite) it back into the text file again. Now the text file has become a file with 50 pages (49 empty pages). How can I avoid this or how can I set an EOF when no more written lines follows. The code for saving the excel sheet is this:
Application. ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(wsImport).Select
Sheets(wsImport).copy
ActiveWorkbook.SaveAs FileName:=WorkFolder & WorkFile, _
FileFormat:=xlText, CreateBackup:=False
ActiveWorkbook.Close
'ThisWorkbook.Activate
Sheets(wsKwartaal).Activate
Trying to create a new workbook from another open workbook, then copying all the sheets that aren't called "Summary" to that new open workbook and then saving it. I get a subscript error on this line:
[Code]....
I have a spreadsheet that imports data, manipulates it then deletes 2 of the sheets then saves the file under a different name to the network. Is there any way to save this new worksheet without it storing the macros - so when the user open it, only the data is there and they get no prompt to enable macros?
View 6 Replies View RelatedI have created a form in a worksheet which I have added questions too and then locked all cells except the ones where I want the answers in.
I have then added a button to the bottom of the sheet called "Print and Save". This work sheet is called "form"
On a second sheet called "database", I have all the titles of the questions running from a -> k and nother else.
What I want to happen is the user input the information on "form" into the boxes available. Once they have completed the questions, I want them to be able to click on "Print and Save" so that firstly the page "form" prints, and then for all of the answers to be saved in "database" below the titles for each question.
I have had a play, but just don't know where to start. Also, once there is a row of questions below the titles, I don't want it to overwrite information already there, it needs to go onto the next empty row available.
Attached is my excel file.
You will see in the code that I have the code for printing.. I just found this on the net and it seems to work fine for me.
I'd like to be able to just open the spreadsheet up and have the macros already saved in there. Is there a way to save these macros?
View 2 Replies View RelatedI have been making and so i thought saving a module however every time i close the spreadsheet that module is associated with it deletes. is there any way to prevent this from happening.
Also when trying to edit on PERSONAL.XLSB!Module1 i get a particular error stating
"cannot edit a macro on a hidden workbook. Unhide the workbook using the Unhide command."
The dialog box comes up with file name formatted correctly and shows .xls as file type but when you choose save the dialog box disappears as if the file was saved but the file never gets saved.
View 3 Replies View RelatedI am trying to write a script to import, reformat and save sales files for upload into our master server and had a question.
how to make it store a range as a dim to use later. I would use
Code:
Range(ActiveCell,ActiveCell.End(x1 Down)).Select
on all the columns, but there are often blanks in many of the rows and I am worried about potential errors.
There is a column which always has all of the rows populated, so I was hoping to could store the range of that column and use it for all the others, so they all match length.
I have a workbook with several users. I'd like to present the user with a message when he/she hits the save or save as button, such as "Have all entries been verified?" with a yes or no option.Need to allow save when either button (yes or No) is entered.
View 9 Replies View RelatedIs there a way to save a formula in Excel, or do I need to use the macro function. I would rather not use a macro due to how simple the formula is but I use it often enough that I do not want to retype it each time.
View 9 Replies View RelatedI'm rather new at VBA
I have a small workbook with a userform and some buttons. Each time I press a button a counter increases and the workbook is saved.
This saving seems much too long for such a small file.
I use
Activeworkbook. save
I have two worksheets in a spreadsheet but after I use it I want to be able to click a button and just save Sheet2 Alone. Can I do this.
I have this that works but would need to change it up to just save sheet2
Public FilePath As String
Sub SaveAs()
Dim strSaveAsFile As String, fp As String
FilePath = ""
' Change the FilePath to suit
fp = "S:Depot Outgoing"
Call MakeFolders(fp)
Call MakeFolders(Format(Date, "yyyy") & "")
Call MakeFolders(Format(Date, "mmm yyyy") & "")
Call MakeFolders(Format(Date, "mmm dd") & "")
strSaveAsFile = UCase(ActiveSheet.[B8].Value) & ".xls"
ActiveWorkbook.SaveAs FilePath & strSaveAsFile, xlWorkbookNormal
FilePath = ""
End Sub
I have 2 sheets in a spreadsheet I would like to Save Sheet2 ("Packing Slip") ONLY!
If I can I am trying something like this.
Public FilePath As String
Sub SaveAs()
Dim strSaveAsFile As String, fp As String
FilePath = ""
' Change the FilePath to suit
fp = "S:Projects"
Call MakeFolders(fp)
Call MakeFolders("PCAR " & Format(Date, "yyyy") & "")
Call MakeFolders("PCAR " & Format(Date, "yyyy") & " OUTGOING" & "")
Call MakeFolders(UCase(Format(Date, "mmm yyyy") & "")).........................
I work with alot of reports that are pulled directly from an application.
On each report i need to 'Alt=' at each cost center so that all manual changes are picked up.
However as you can imagine with thousands of rows this could take a while and be very tedious. Is there a quick way to do it?
Subtotals will not work because the costcenters will appear in the same column as the employee numbers.
I have excel 2003 for XP and I have a excel file that is a csv. I used easyfilter to filter my results. (I wanted to delete complete rows that had no information in a certain field in column) Everytime I complete the task and try to save it, it tells me file.csv may contain features that are not compatible with csv do you want to keep the workbook is this format? -to keep this format, which leaves out any incompatible features, click yes. -to preserve the features, click no. then save a copy in the lastest excel format.
My question is this...is there a way to bypass this? Is there a simpler way to delete those rows without using easyfilter so that I can save it after the rows have been deleted.
I have an Excel doc with ~20 tabs. Each type represents 1 type of activities (soccer, tennis, etc). The size of the file (with the 20 tabs) is pretty significant (>1mb), which jams our email traffic.
Is it possible to:
- keep this workbook with the 20 tabs when open by the user;
- let the user select and fill in whatever tab he needs (just one at a time);
- have a button for the user to click that will save only this tab with a different filename (therefore, when sent by email, the file should be pretty small).
I tried to implement many other Saveas macros into it. from other post and members. I can't seem to get it to work. As the macro is, It saves the copy to My Documents. But, I need it to save to the dierctory below. Any help will be appreciated.
',//Tom's-srv01sharedQC DocumentsCustomer Inspection Reports
Sub myBuildDupWB1() 'Static Inprocess
ThisWorkbook.Unprotect
Dim sht As Object
Dim strMyNewWB$, strMyOldWB$
On Error GoTo myErr
strMyOldWB = ThisWorkbook.Name
Workbooks.Add
strMyNewWB = InputBox("New Customer Part Name, below:", "Name Workbook!", "Rename Blank InProcess Op")...........
code for saving individual sheets from a list box, i have the code to print individual sheets but i need to be able to save a selection of sheets at one time to a given file.
View 9 Replies View RelatedI have a form which has col A Surname Col D Post Code Col E The month (for example)
through a formular this gives the unic customer reference number surnamepostcodemonth given in col G but when I save the document I have to copy and paste the value in G1 for the file name is there away of pressing Save As and it auto fills the file name?
the actual value in the field G1 is
='Raw Data'!D2&" "&'Raw Data'!E2&" "&TEXT(('Raw Data'!F2),"MMMYY")&" "&'Raw Data'!G2
I obviously want the result "Smith TW6 Jul09" to be the file name when I save it..
Every year I set up a database for all types of info gathered during the week, this info gets sent to various people around the company on Sunday nights. The workbook has 52 sheets, one for each week.
Normally I type in the week ending date on every sheet, or I have =Sheet1!A1+7 in sheet 2 and so on. Is there anyway I can add the date on sheet 1 and make it put the correct week ending date in the same cell in all subsequent sheets.
if it is possible to save just one sheet out of a workbook. I suppose it would save as a whole new workbook with just that one sheet, which is fine.. but is there a command that does this?
View 9 Replies View Relatedhow to set up a macro that will close my workbook without saving.
View 3 Replies View Related