Workbook Still Asks To Save On Exit?

Mar 21, 2012

I have some code that does some maintenance on my workbook, calls a second macro to delete all of the VBA and saves it with a new name.

However, after it finishes and I try to exit Excel, I am still prompted to save the workbook. I'm not sure why because the last thing my code does is save the workbook and no additional changes have been made.

Code:
'Loop through all cells
For Each Sht In ThisWorkbook.Worksheets
With Sht

[Code].....

View 9 Replies


ADVERTISEMENT

Printing Multiple Excel Files - Asks Me To Save Every Time

Jun 12, 2007

I'm trying to print out multiple excel sheets in which it asks me if I want to save the changes or not every time. I have macro settings set to low so I always accept the macros, if I don't have them set to low I'm always asked the question of whether or not I want to run the macro for over 20+ files. Anyone ever had similar problems when printing multiple files?

View 9 Replies View Related

Excel 2003 :: Printing Multiple Files With Explorer But Asks To Save Changes?

Dec 7, 2012

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.

View 1 Replies View Related

Forcing Me To Save As On Exit.

Oct 21, 2008

recently excel 2003 began forcing the save as dialogue box when i try to close the workbook. I do not remember installing anything in particular on my machine when it started acting up.

I tried uninstalling office with Revo Uninstaller (gets rid of those pesky registry entries that the control panel add/remove leaves behind).

I reinstalled and I have the same issue.

Im thinking it is a macro of some sort as when I open the program holding down shift, it does not prompt me to save as when I exit. I do have one excel add in installed, but I have used it for many years without any issues.

View 9 Replies View Related

Exit Without Option To Save

Sep 8, 2005

Is there anyway I can make excel quit using VBA without the option of saving the changes popping up?

View 5 Replies View Related

Exit Excel After Save From Userform

May 20, 2013

I'm trying to solve when hitting the Save/Close button on my Userform.

Give the User the option to Save As the toolGive the User the option to either exit or return after Save AsIf Exit - hide all but the first worksheet (in case they open with Macros DisabledClose/Exit

My current issue is when I click the button and choose Exit Yes then the form and workbook close, but Excel is still open. Is there a way to have Excel fully close if no other workbooks are open?

Code:
Private Sub cmbSaveAs_Click()
Dim sFilename

If MsgBox("Save the file?", vbYesNo) = vbYes Then

sFilename = Application.GetSaveAsFilename(fileFilter:="Excel Macro-Enabled Workbook (*.xlsm),*.xlsm")

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

View 2 Replies View Related

Exit Function- The Result Returned To Me And Exit (all) Open Functions

Apr 24, 2009

I would like to call upon a function until a certain criterion is fullfilled. Then, I would like to have the result returned to me and exit (all) open functions. For value1 = 1 and value2 = 10 I expect value1*value2 = 100. Instead, the routine returnz zero. What is the logical flaw in the code below.

Function testfunction(value1, value2)
If value1 = value2 Then
'Calculating the difference
testfunction = value1 * value2
Exit Function
ElseIf value1 < value2 Then
value1 = value1 + 1
Call testfunction(matrix1, matrix2)
End If
End Function

View 9 Replies View Related

VBA To Exit Excel Application Not Only Workbook?

Feb 17, 2012

I have some code that I am using to save and close the active workbook, this code works perfectly, but I need the code to also close the excel application, not just the workbook. I have tried active window.close but it didn't work even though when I recorded the actions that was the code that I was give.

background -I set a task in my OS to open the workbook, then I wrote some code on the Workbook.open trigger to run and then save and close, but only the activebook closes.

View 2 Replies View Related

Excel 2003 :: Unable To Allow Users To Make Changes To Workbook But Only Be Able To Do Save As Not Save

Dec 3, 2012

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.

View 4 Replies View Related

Find/Replace Asks To Update Values

Aug 16, 2006

I am copying fomulas from one row to the next. Then I am using the Find and Replace tool to replace some key text. This technique has worked 65 times. Now when I try to Replace All a box comes up asking me to Update Values for the text im replacing. Why is this happening?

View 4 Replies View Related

Save Workbook Using Variable For Save As And For A New Folder Name

Jul 31, 2009

I have figured out how to save the workbook using a variable to saveas but I would like to create a new folder to place the new workbook into. I have tried a few things a am not having any luck. I recorded a macro and the code it produced is as follows.

View 6 Replies View Related

Excel Asks To Update Values By Loading New File

Sep 23, 2013

I'm doing a Vlookup and when I copy down the formula Excel asks me to update the values by opening a new document. But this I can't or don't want to do - but I can't get rid of the box that asks me update the values with a new file.

How to remove this?

View 1 Replies View Related

Create An Inputbox That Asks A User Which Set Of Rows To Copy

Aug 20, 2009

The example file gives a better visual explanation. Just want to copy a range of cells by pressing a command button. However I want the macro behind it to ask the user which set of rows to copy.

View 14 Replies View Related

Save Button Save The Workbook

Apr 5, 2007

I have a update/Save button on a spreadsheet. So when clicked it updates another sheet and saves the workbook.
how can i have it run the macro when they don't click the button and do
File -> Save.

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 Single Sheet To New Workbook And Delete VBA Code From New Workbook

Jun 25, 2014

I'm trying to find a way to save a single sheet of an excel workbook and in the same process delete all vba code and shapes from the new single sheet workbook. I was looking around and found this code which does save only the single sheet to a new one sheet workbook but doesn't delete the vba and shape that I have used to assign macros to in the original.

Code:
Sub SaveSheetAsNewBook()
Dim wb As Workbook
Dim InitFileName As String
Dim fileSaveName As String
Dim wshape As Shape
InitFileName = ThisWorkbook.Path & Format(Date, "mm.dd.yy")

[code]....

View 2 Replies View Related

Macro To Save As Workbook 2 From Data In A Cell From Workbook 1

Sep 28, 2012

I have two workbooks open. I need to "Save As" and close workbook 2 with a file name from a cell in Workbook 1. The macro is running from workbook 1.

I'm guessing a change in the last line. I don't know what Dim means either.

Dim FName As String
Dim FPath As String

FPath = "G:"
FName = Sheets("sheet 1").Range("A1").Text
ThisWorkbook.SaveAs Filename:=FPath & "" & FName

View 1 Replies View Related

Open Workbook Then Save As Different Workbook Dependant On A1

Feb 14, 2009

is it possible to work on a workbook lets call it 123

once macro button is pressed it opens workbook abc

then saves it as what ever is in cell a1 to a directory?

View 14 Replies View Related

Save Workbook As Macro Enabled Workbook By VBA

Jan 23, 2012

the following scenario.

I am using the following code to save a workbook as a macro enable workbook on the selected path as today's date. But it is being saved as a macro free workbook.

Below is the code in module:

Sub save_file()
Dim tDate As String
Dim FileSaveName As String
Dim fPath As String
tDate = VBA.Format(DateSerial(Year(Date), Month(Date), Day(Date)), "dd-mm-yyyy")
'FileSaveName = Application.GetSaveAsFilename(InitialFileName:=tDate, filefilter:="Excel Files(*.xlsm),*.xlsm", Title:="Please save the file")

[Code]...

View 4 Replies View Related

Save Data From One Workbook To Another Without Opening Workbook

Mar 1, 2013

I have a spreadsheet that data gets exported to from a software program. There is information such as customer name, part number, inquiry number, etc that I'd like to use to develop a log of all my estimates I create for parts. I'd like excel to take the cells I select and insert them into certain cells in the other workbook and automatically save that workbook. This will create a log of all my estimates where I can then link the full estimate to the log. The information will have to go in the next available row. Is there any way I can accomplish this without having to open the other workbook and save the work book each time?

View 1 Replies View Related

Save Column J Of WorkBook When WorkBook Is Not Saved.

May 27, 2006

Need VBA code to save column J of open workbook called LmbcAcctsPayable.xls, Sheet1, to same workbook & sheet called LmbcAcctsPayable.xls, Sheet1, when save is not selected.

Reason: The workbook is usually not saved because it is more of a templet with names in column A. Column J is updated with a date when a row is used so I need the column J to copy automatically to the blank templet when exiting without saving (using ThisWorkbook.Save = True in Auto_Close). That way, rows not being used for a long period of time can be periodically eleminated.

View 3 Replies View Related

VBA Save Workbook As Shared Workbook

Aug 30, 2012

HTML Code:

Private Sub SaveAsAndShare()
ActiveWorkbook.SaveAs Filename:= _
"S:LdnPath1Path2Path32012Folder1Folder 2Aug12ReportName " & Format(Date, "MM-DD") & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub

HTML Code:

ActiveWorkbook.SaveAs FileName, , , , , , xlShared

My code is the first bit, the 2nd code I found from another post, I want to add xlshared to my code above so it is shared when saved down.

View 4 Replies View Related

Save Workbook On Workbook Close

Aug 26, 2006

I snagged this code out from another project I wrote, and it works fine in that one, but doesn't in the new project.

What I want, is when the person presses the exit button, it will save whatever was done, its running as a form printer and database. The code below is the code for my exit button.

Private Sub CommandButton4_Click()
Dim sAnswer As String
Dim i As Integer

' ****************
' ** Exit Button**
' ****************

When it gets to "If ActiveWorkbook.Saved = False Then" it does put the question out "Do you want to save changes" I click Yes and it doesn't save it.. I have tried both activeworkbook and thisworkbook ... I copied the code and verified all is good to go..

View 9 Replies View Related

Macro To Save Workbook By Referencing Cell In Another Workbook For File Name And File Path

Mar 21, 2013

I have got a master workbook and I have written macro to copy and paste data on another workbook. write a macro to save the new workbook to a file path with a file name where both file name and path are stored in master workbook sheet...

View 5 Replies View Related

Save Workbook With New Name?

Aug 19, 2014

I have a macro that I have been trying. I want to take a workbook and do a saveas, remove one of the tabs called UPDATE closing the original and renaming and dating the new workbook.

View 2 Replies View Related

Save Workbook By Name

Jun 23, 2009

If i have 2 workbooks open and want to save only one of them and it is not the active one and i cant make it active as it is hidden.

View 2 Replies View Related

Save Workbook

Dec 26, 2008

I have a Sub SaveFile() in a standard module and a Sub in ThisWorkbook module that will call that Sub; however, I have another Sub CopySheet() that I would like skip the Sub SaveFile(). The reason I do not want the Sub SaveFile() to run is because I am making 19 copies of the first sheet and I do not want the user to have to click "Yes" 19 times. How can I have Sub Savefile() ignored when I run Sub CopySheet().

Sub SaveFile()
Dim Ans As Integer
Dim Filt As String
Ans = MsgBox("Confirm you want to save this File." & (Chr(13) & Chr(10)) & _
"File will save as: Backup - (SheetNumber).xls in current directory", vbYesNo)
If Ans = vbNo Then Exit Sub
Application.DisplayAlerts = False
ThisWorkbook.SaveCopyAs Filename:=ActiveWorkbook.Path & "Backup - " & ThisWorkbook.Name
.............
End Sub

Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Call SaveFile
End Sub

Sub CopyBook()
ActiveWorkbook.Save
Dim i As Integer
For i = 2 To 3
ThisWorkbook.SaveAs Filename:=ThisWorkbook.Path & "" & CStr(i) & ".xls"
Next i
ActiveWorkbook.Close
End Sub

View 9 Replies View Related

Prevent To Only Save On Specified Workbook With VBA

Jan 28, 2013

am trying to create a workbook template which collects data from users with user forms and some macros. Users assign a project name when workbook opens and then they are able to save as the workbook with name of project name. But i don't want them to save on my template mistakenly. How do i prevent this? I tried workbook_before close sub but i can manage that it recommends to save workbook with project name and if you don't want, it still asks you if you want to save workbook before close

View 7 Replies View Related

Save And Close Workbook Using VBA

Dec 11, 2013

How can i save and close one workbook in excel with vba code.

View 2 Replies View Related

Workbook Asking To Save When No Changes Made

Mar 1, 2013

I have made some changes to a workbook and now every time I want to close it I'm asked if I want to save the changes, even when I have made no changes. If I click 'Yes' to save changes the problem still occurs the next time it's opened & closed.

I have checked external connections and there are none. I have done a 'find' to check that there are no formulas looking at another sheet, which I cannot find.

This document has to have a live calculation function - I have read some suggestions around turning off auto calculations but this isn't a possibility and I'm not sure that this is where the problem lies.

The previous version does not have this problem, so it is something I have done between v2.2 and v2.3. I have attached both for reference. Note that they were originally xltm's not xlsx's - I could not upload macro-enabled templates, but the same problem occurs in v2.3 in this format.

View 3 Replies View Related







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