You are here: HomeExcelTutorials
Facebook Twitter Reddit More...

How to get VBA to answer a close (save) file prompt

How to get VBA to answer a close (save) file prompt

Price: FREE

I have code in my Excel spreadsheet to copy and paste from a worksheet to a new worksheet. I then save this new worksheet as a CSV type file. When I close this active window (the CSV file) via VBA, it asks me if I want to save the file (I have to manually say "no").
How do I get VB to either say no automatically or bypass this message and close the file?

Visit publisher's web-site: How to get VBA to answer a close (save) file prompt

Category and Tags: ExcelTutorials :

Related Tutorials

No "Save prompt" on closing Excel

Free: Yes
Tags: Excel ›

They say it's only easy if you know the answer, but I've never come across this before.
I'm running Excel 2010, and when I click on the X button to close the application, it automatically closes without giving me a save prompt beforehand! I normally save prior, but sods law, on the one occasion I don't, then I've lost the changes to the workbook as it didn't prompt me to save changes prior to closing!
Can anyone help in getting this function back on? (It did work in the past, but I can't for the life of me think what I've done to disable it!)

Save on Close

Free: Yes
Tags: Excel ›

Is it possible to turn of the save prompt when you close an excel document with VBA? If so, how?

Bypass Save Prompt

Free: Yes
Tags: Excel › VBA

I have a macro to perform a bunch of functions, then save and close a worksheet. However, whenever this runs, before closing it asks "would you like to save" or something like this. The code I have so far is:
Sub the macro()
' Bunch of code up here
ActiveWorkbook.Save
Windows("This Window").Close
End Sub
Every time this runs, it asks me to save (Yes No Cancel)
How can I bypass this or make it automatically choose Yes?

VBA code to save and close a workbook

Free: Yes
Tags: Excel ›

with the help of Lucerne (thanks dude) I finally got my macro finished. Now all I want to do is save and close it.
I have this:
ActiveWorkbook.Save
ActiveWindow.Close
but I still get prompted if I want to save the file or not -

Macro to close workbook with prompt

Free: Yes
Tags: Excel › Functions

I would like to run a macro that will save the workbook in a
particular directory, but it will prompt the user for the file name.

Related Applications & Scripts

Tabbed Command Prompt

Free: No
Tags: Software › Excel Development Tools

PowerCmd enhances your command prompt with an easy-to-use Windows GUI-style interface and allows you to run multiple consoles within a single tabbed window. You can easily organize multiple consoles in vertical, horizontal, and grid forms. Auto-log, auto-completion, keywords highlight, configurable font and colors, customizable toolbar for frequently used commands or tools and minimizing to tray are easy solutions to daily needs. With PowerCmd, you can save and restore your sessions from last time.

Import csv data into mysql

Free: Yes
Tags: PHP › Excel Databases

This script is useful mainly if you dont have phpmyadmin, or you dont want the hassle of logging in and prefer a few clicks solution, or you simply are a command prompt guy.
This script will allow you to import csv data into your database. This comes handy because you can simply edit the appropriate fields, upload it along with the csv file and call it from the web and it will do the rest.
It allows you to specify the delimiter in this csv file, whether it is a coma, a tab etc. It also allows you to chose the line separator, allows you to save the output to a file (known as a data sql dump).

Flash Upload Widget - Mutliple File Uploader

Free: No
Tags: Flash › Excel Upload Systems

The skurrilewelt UploadWidget is a little light weight (only 10 kb) tool that can be easily used as a standalone uploader on websites or plugged into in your webapplication.
The preview shows, how the plugin is presented in a website. Click Browse, to select multiple files to upload. Click Close and the uploader will disappear. (Close option only works, if the widget is used in a flash dialog box in a flash application).

pdf-FormServer - Fill and Save PDF Forms

Free: No
Tags: Software › Excel PDF

Save your PDF form to disk and open it again without loosing your entries.
Who has not come across the situation: You complete a PDF form in Acrobat Reader and when it comes to saving your data, nothing happens. Or worse: You close the program and all your data is lost. The reason for this is: Acrobat Reader cannot save any form field data! This is not only time consuming but also very unpleasant.
pdf-FormServer eliminates this problem in a very easy way! Once this software solution has been installed, all filled out PDF forms can be saved locally either as FDF, XFDF (for further electronic processing) or directly to PDF. No need to mention that all forms that have been filled once can be read again with the included data and also altered at a later date or send by email.

Voice Recorder

Free: No
Tags: Flash › Excel Audio

The component can be used to record voice from microphone and send to server in WAV file or save to local disk. You can process binary WAV file by your own web server script, for example, created in PHP .
Notice: Voice Recorder preview doesnt allow to save WAV file to the server because of the Activeden server limitation. However you can save to local disk. Full version of Voice Recorder component includes saving to the server.
FEATURES :
- Supported sample rates: 8000Hz, 22050Hz and 44100Hz,
- Timeline with oscillogram of WAV file,
- Configured via XML ,
- JavaScript interaction,
- Custom size,
- Custom colors,
- Language localization,
- Examples are attached.

© 2014 Contact us - Privacy Policy - Terms of use - Add Listing