Save Static Copy Of Workbook. No Formulas

Aug 16, 2007

Is it possible to use VBA code to save a copy of your workbook while removing all formulas and replaceing them with values and formats only? I know how to save and rename, but can;t find the command for a "Static Copy".

View 9 Replies


ADVERTISEMENT

Save As Workbook Without Formulas?

Apr 3, 2014

I need to save my workbook to another drive every Friday for archive purposes. My workbook contains time sheets for each employee. Currently I use a command button to copy and save the workbook to the correct place and it works perfect. However, the formulas are copying with it and when I open the saved workbook in the future the dates have changed in the Mon-Fri cells. The reason for this is because I have a formula in the week starting cell that changes the date automatically every Sunday. Then, the dates in the Mon-Fri cells change with it.

What code can I insert, and where, to keep the formulas from copying over with the workbook? The code I am using is below:

[Code] ......

View 14 Replies View Related

Save Data To New Workbook Without Formulas Or Macros

Dec 2, 2009

if there was a way to disable mcros but I think now I should have pursued the option of saving data to new workbook without transfering the existing formulas or macros. I really think I should attach the sheet I have thus far so I can convey what I am trying to accomplish. Anyone interested, please let me know and I will forward the sheet. I am unsure how to do this any other way. I found some code that would claim to do this but I have so many things going on already in this sheet I can't figure out how to incorporate the new code to work properly. Here is the original thread for reference [url]

View 9 Replies View Related

SaveAs - Copy Sheet Into New Workbook And Save It In Same Folder As Original Workbook

Jun 17, 2014

I have been trying to edit a code which previously saved a copy in a new workbook to a specific folder/path. (Additionally it copies and clears some figures, but this is working as it should.)

However I would like the copy to be saved at the same location as the original workbook, regardless of the path the original workbook is saved.

I.e if I need to move the workbook containing the code to a new folder/location, when using the macro, the new copy should be stored in the same folder/location as the original one.

For now it is only saving the copy into "My Documents"

Code:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 16-02-2009 by ceng
'

Sheets("Bunker ROB").Select
Sheets("Bunker ROB").Copy
ActiveWorkbook.SaveAs Filename:= _
ActiveWorkbook.Path & Range("D3"), _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

[Code] ........

View 2 Replies View Related

Save As With Static Name Along With Cell C1 Value

Mar 13, 2012

I have developed an excel template that is used at our fire department for dispatching purposes. The template is loaded and then info is placed into the template. It is a read only file so I am looking to have it save the file name as "Incident Report ()" replacing the bracket will be the value of cell C1. Example would be "Incident Report 234". I would also like it to save in the same file location every time.

View 6 Replies View Related

Multiple Index Match Formulas Instead Of Static If Vlookup?

Apr 10, 2014

I attached a file containing two sheets. The first sheet is called Input on this sheet there are several categories of which I displayed the first three on. My ultimate goal is to get the Input per category broken down horizontally over the line-items on the Output sheet. Every category contains several line items to which costs are attached (f.e. in category 10, line item 4000, the costs are 33,000$ and so on).

The problem is that every month the costs are changing per line-item, but also the number of line items per category will change due to the fact that the line-items are only displayed if there are in a specific month costs booked to the line-item. In other words sometimes line-items are added due to costs booked at the line-item, but if in one month there are no costs booked at the line-item it disappears from the overview. A formula containing: '=if(category=10,vlookup(... is to static due to the changing line-items.

View 8 Replies View Related

Copy Worksheet Values (without Formulas) To New Workbook

Sep 6, 2012

I have a workbook that has quite a bit of data and goes through a lot of processing to arrive and a final summary worksheet. I want to take this summary worksheet and copy the values to a new workbook.

The issue is when I use the following code, it pulls the worksheet into a new workbook with the formulas (which turn to error messages since there is no longer a connection to the data source).

I could lengthen the code to create a new workbook, select the original data, copy, paste values into the new workbook, but that approach seems longer than needed. I'm sure there has got to be a way to copy just the values quickly and simply.

HTML Code:
Dim Template As Workbook
Dim SourceData As Worksheet
Set Template = ActiveWorkbook
Set SourceData = Template.Sheets("Summary")
SourceData.Copy

At this point I now have a new workbook with one worksheet full of "#N/A" and "#VALUE!". Is there a way I could do something like "SourceData.CopyValues"?

View 3 Replies View Related

VBA To Copy Worksheet To New Workbook And Save

Oct 19, 2011

How to copy the entire worksheet into a new workbook and save the file to a specific directory with the following filename format ("exceptions191011 - ie. the word exceptions followed by today's date in ddmmyy format).

Here is what I've got so far:

Code:

Sub SaveAs()

Dim FName As String
Dim FPath As String

FPath = "G:Exceptions"
FName = "Exceptions" & Format(Date, "ddmmyy") & ".xls"

Sheets("DataSort").Copy
ThisWorkbook.Sheets("Sheet1").SaveAs Filename:=FPath & "" & FName

End Sub

How to add the following condition that if a file already exists with that name then to bring up an error message stating the file already exists? As well as save the new workbook, it appears to close the original workbook - can I stop this?

View 3 Replies View Related

Save Workbook As Copy To Another Directory

May 20, 2009

I need save my workbook as copy to another directory, ( C: ) with VBA code

View 9 Replies View Related

Save A Copy Of The Open Workbook

Dec 4, 2009

I know that the line in my code Worksheets.Copy is NOT what I need to have to make this work, but with it it's the closest I could get to what I want.

I want the user to be able to click the SAVE command button, be allowed to either accept or change the default save options, save the current workbook and then go right back to the form that has the SAVE command button. Sounds simple, I know, but when you don't know the right commands to save the WORKBOOK, not just the WORKSHEETS, it becomes a P.I.A.

I know there's a lot there, but here's my code, which is just a slightly altered version of the code by Ron de Bruin:

Private Sub SaveData_Click()

'If no date has been selected then don't allow SAVE
If PubDateLabel.Caption = "" Then

MsgBox "Publication Date not set. You must select a date before saving.", vbCritical, "No Publication Date!"
Exit Sub

End If

View 9 Replies View Related

Copy Values Only To New Workbook & Save

Sep 8, 2006

i need to copy from one workbook to another at present i have formulars in columns a b c d e g in f and h the is data that could go to f and h100 these are not formulars

i need to be able to copy the data from a1 to the last cell with data in it in column A to the same row in column h

View 9 Replies View Related

Copy Worksheet To New Workbook & Save

Oct 18, 2006

I have a workbook with a worksheet named "Report"... this sheet and it's macros generate a report from data on another sheet. I'm adding a button to copy the (filled) Report sheet to a new workbook, rename the new sheet in the new workbook "Rep[Name]", then save and close the new workbook. I've recorded a maco of me doing these tasks manually, but what's recorded seems very generic, and does not seem to specify what's really occurring...

For example (in part);
> Rightclick on the Report tab
> Move or Copy
> To Book: (new book)
> [x]Create a Copy
> [OK]

yields:

Sub Macro1()
Sheets("Report").Select
Sheets("Report").Copy
End Sub

This recorded macro does not specify (new book), or Before:"Sheet1" as was the result of my actions... and when replayed back, only makes a copy in the active workbook, before the active sheet...

View 4 Replies View Related

Copy Workbook Table To Another WB Without Adding Title In Formulas

Jan 4, 2012

I'm trying to copy a huge list of formulas and formats from one work book to another almost identical, each time it adds the old workbook name title into the formulas, this is easy to do in the formula bar for individual formulas but can this be done for many?

View 3 Replies View Related

Macro To Copy Rows To New Workbook And Save?

Mar 9, 2012

I'm looking for a macro that can do the following:

Contact
First Name
BD
Case
XXXXXXX
Aaron
A
XXXXXXXXXXXXXXX
XXXXXXXX
Abigail
C
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXX
Accounts
D
XXXXXXXXXXXXXXX
XXXXXXXXXXXXXX
Adam
C
XXXXXXXXXXXXXXX

Filter by BD 'C'

Copy all rows containing 'C' to new workbook.

Save new Workbook as 'Mailing C.xls' and close to specific flolder.

View 7 Replies View Related

VBA To Copy Multiple Sheets Into New Workbook And Save

Jun 23, 2014

I have managed to pull together code that does the required task - save two sheets from a work book in to a new workbook on to a dorectory each day. However I woul;d liek to paste special the values and cannot figure our how to reference that on the below:

'saves text file in day on day folder
Dim WS As Worksheet, CheminDest As String, fNAME As String
'create directories as needed
On Error Resume Next
CheminDest = "T:DMRatesReportsChecks" & Year(Date) & ""

[Code] ..........

View 3 Replies View Related

Save Workbook Copy To Same Path As Original

Aug 27, 2007

I'm trying to save a copy an excel file in the same directory of the original file. The code is pretty standard but it does not work if the file is stored in C: (only c: ) Is that a bug or am I doing something wrong? Anyways here is the code in case someone is interested in trying it out:

Sub CreateCopy()
ChDrive ThisWorkbook.Path
ChDir ThisWorkbook.Path
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls", _
InitialFileName:="CMS_" & Format(Now(), "mm-dd-yyyy"))
If fileSaveName <> False Then
MsgBox "Backup copy saved as: " & fileSaveName
End If
End Sub

View 5 Replies View Related

Save Copy Of Workbook, Leaving 1 Sheet Only

Sep 11, 2007

I have a workbook that has worksheet called "Data". In that workbook, there is some codes for the event of "workbook_beforeprint". My question is whether i could create a copy of the "master" workbook and delete all the unwanted sheets but "Data" sheet using VBA. There are some codes of creating a new workbook but i suppose i need to the exact copy of the current workbook using VB

View 3 Replies View Related

Save Copy Of Workbook Without Closing Original

Jun 14, 2008

I want to have a user press a button on a worksheet page to save a copy of the workbook (and be able to name it and choose where to save it to) without closing or modifying the original. Note that if you "save as" manually it renames the workbook and closes the original.

View 7 Replies View Related

Copy Into New Workbook & Save With Date In File Name

Aug 7, 2008

I have a report which I have written a macro to reformat, I then want to copy the sheet (Remake) containing the report into a new workbook as the only sheet in the new workbook. I want the sheet name to be changed from "Remake" to "Duty to Consider" and I want the new workbook to save itself automatically as "Duty to Consider - Month/Year" - in this case it would be "Duty to Consider - August 2008".

I think that a Pop Up box which lets me input the Month and Year of the report I am working on would be useful in naming the new workbook, if this box popped up when I click the button which runs my Macro that'd be great. Here is the code I am using to reformat my report. This works fine I just need the changes I mentioned. Application. ScreenUpdating = False 'this will turn on screen updating, making the macro run faster

'This will select the DTC Tab and remove rows 1-4
Sheets("DTC").Select
Rows("1:4").Select
Range("A4").Activate
Selection.Delete Shift:=xlUp

'This will add a filter to the data to remove duplicate rows
Range("A1").Select
Range("A1:J1307").AdvancedFilter Action:=xlFilterInPlace, Unique:=True

'This will copy the data on the DTC tab and copy it into the Remake Tab
Cells.Select.....................

View 2 Replies View Related

Copy All Selected Sheets (data / Formats / NOT Formulas) To New Workbook

Oct 2, 2013

I had a macro on my previous laptop that worked, but didn't have the macro backed up so it was lost.

I need a vba macro that will copy all active/selected worksheets into a new workbook. Included requirements:

* Maintain tab names

* Only bring in contents/data with all formats (including logo image, but NOT formulas or hidden rows/columns)

* Keep the file name the same except adding "- FINAL" to the end

View 3 Replies View Related

Save Copy / Backup Of Workbook As Date In Certain Folder

Sep 7, 2013

I need to save an excel workbook when a "backup" button is pressed to a folder named "Backups". I want the name to be the "date" (09/07/2013) only and I want it to automatically overwrite anything previously saved for that day.

Book1.xlsm

View 2 Replies View Related

Save Copy Of Open Workbook And Make PDF For Archive

Apr 27, 2012

Code, couldn't make it work with VB HTML Maker. I'm new with VBA Basically my idea is when someone open default file, insert data, try to save file, macros save workbook with inserted data as another file (*.xlsx) and make pdf in another folder. Pdf part is working fine, but with second part just can't find right option.

Pdf part

Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Dim Name As String
Dim i As Integer, j As Integer
Name = ThisWorkbook.Path & "PDF Archive" & ActiveSheet.Range("F6") & " Invoice " & ActiveSheet.Range("B11")

[Code]...

Excel part

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ActSheet As Worksheet
Dim ActBook As Workbook
Dim CurrentFile As String
Dim NewFileType As String
Dim NewFile As String

[Code]...

View 1 Replies View Related

Copy Text From Word Doc - Write And Save Workbook

Jan 12, 2013

I'm using a code to copy text from a word doc into a spreadsheet. It does it all right, but when it comes to saving, it does not save the open worksheet and prompts me to save as a copy. If I do so, nothing is changed in the original file and the copy file has the information copied from the word file.

This is the code I'm using to write and save the spreadsheet.

...
(VBA in WORD)

Set wdApp = Excel.Application

Workbooks.Open FileName:="C:UsersljsDocumentsword2excel.xls"

Workbooks("word2excel.xls").Activate

Worksheets("Plan1").Activate

Worksheets("Plan1").Range("A2").Value = DOCname
Worksheets("Plan1").Range("B2").Value = CarNo
Worksheets("Plan1").Range("C2").Value = WordNo

ActiveWorkbook.Save
ActiveWorkbook.Close
...

View 1 Replies View Related

Copy Current (Selected) Sheet To New Workbook And Save As Tab Name

Feb 28, 2014

I want to take the current sheet and copy to a new workbook (keeping the tab name) and then save as the tab name (xlsl) and close.

I've found ones that do a Saveas box or ends up saving as "Sheet1," "Sheet2" etc but can't seem to find one that keeps tab name and saves.

Here is the one I was using, but it saves all tabs not just selected:

Code:
Sub CopySheet()
Dim fname As Variant, ws As Worksheet, wb As Workbook
Dim nCol As Integer, iCol As Integer

[Code].....

View 1 Replies View Related

Open Workbook / Copy / Close Without Offer To Save?

Mar 12, 2014

I've got a kind of "menu" sheet that will pull up various reports from Excel spreadsheets. Rather than having the user work with the live data, the menu opens the file and saves it as a copy, closing the original. This is working fine.

The tweak I want to add is, since the user is looking at a copy rather than the live data, I don't want them to save when closing. Is it possible to programatically add a bit of code to the new copy to handle this?

Here's a sample of one of the menu button's code:

Code:

Private Sub CommandButton18_Click()
Dim wb As Workbook
Set wb = Workbooks.Open(Filename:="J:Z PII OvensRack Repair TrackingRack Repair List.xlsx")
With wb.Worksheets("Sheet1")
.Unprotect Password:="pass"
ActiveWorkbook.Worksheets("Sheet1").Copy
End With

[Code].....

View 7 Replies View Related

VBA Copy From Sheet To New Workbook And Save As From Name In Target Cell Then Loop

Aug 27, 2012

I need VBA code for the following - I have a worksheet with seven colums of data (A to G) - I need to copy the first column (A) from the active worksheet then open master workbook called 'master' and paste the data in to column D - then save the 'master' as the name in cell Z1 of the 'master' workbook. Once this has been been completed I need to repeat the process but this time copying column (B) and so on.

View 4 Replies View Related

Multiple Sheets Copy And Paste Into New Workbook And Save As With VBA Excel

May 23, 2013

I want to copy 4 sheets and paste it in a new workbook and save it.

I have this code recorded

VB:
Sheets(Array("PIV", "Report")).Select
Sheets(Array("PIV", "Report")).Copy

But it don't work?

View 2 Replies View Related

Date - Sheet To Copy The Info To Another Workbook, Save And Close

May 3, 2007

I have a sheet that users fill out and there is a macro on that sheet to copy the info to another workbook, save and close.

for some reason, the date, which originates from a cell with the value "=Today()", and when pasted in to the new book, it is pasted values.

the issue is, every so often, the date will say 09/26/10 and continue to do so for quite a few entries.

i have tried almost everything. I checked the dates on the computers, and all are fine. i even went through it step by step, and when the data pasted it, it was 09/26/10.

View 9 Replies View Related

Macro To Copy Dynamic Sheet In New Workbook - Save As Temp / Mail And Delete

Sep 15, 2014

Code to copy the sheet that get selected by if-then-elseif statement and paste in a new workbook, save the workbook as temp, email it and delete it,

sub sending_mail

Dim OutApp As Object
Dim OutMail As Object
Dim rng As Range
Dim DataWB As Worksheet

[Code] ......

View 2 Replies View Related

Excel 2007 :: Copy / Paste All Rows For Each Unique Name And Save In Separate Workbook

Dec 11, 2011

I am using Excel 2007

I have a spreadsheet with 1,000 rows in multiple columns

In column "B" i have 8 unique names.

What I am trying to work out is to copy and paste all the rows for each unique name and save in a separate workbook named as the unique name.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved