Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
GetSaveAsFileName to prompt for overwriting?
Alternatively, put the GetSaveAsFileName inside a Do Loop. When the user
inputs a file name, do Dir() or the equivalent to see if the file exists. If so, offer the choice of overwriting (in which case you exit the loop) or trying to enter an unused name; if not, exit the loop. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Thomlinson" wrote in message ... Why not just use the SaveAs dialog then? Application.Dialogs(xlDialogSaveAs).Show "MyFile.xls" -- HTH... Jim Thomlinson "simonc" wrote: GetSaveAsFileName only returns the path where you want to write the file, without any checking or actual saving. How do you code a check that if this file already exists it asks if you want to overwrite it or not, and, if you decide not, would keep the GetSaveAsFileName dialog open so you can type in a new file name? (ie, exactly the behaviour you get when you use SaveAs in Microsoft Excel). Grateful for any help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
GetSaveAsFilename | Excel Programming | |||
Help with GetSaveAsFilename | Excel Programming | |||
GetSaveasFileName | Excel Programming | |||
GetSaveAsFileName | Excel Programming | |||
Overwriting an existing workbook without having to click yes in the prompt box | Excel Programming |