Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Warning Message to Prevent Overwritting
I have a macro which does the following:
1.- Save a file at specific path. The filename is taken from a specific cells 2.- Create a database. Find the last empty row then write the new filename. However, I have noticed that I made a mistake and typed the same data at the specific cells to create the filename and click the macro to save it. This filename went at the last empty row of the database (as I expected it) but overwrote the last filename. Therefore, I have now two filenames with the same description in my database saved it at different time and overwritten with the last information. Is there is a way to write an statement before save the file to warning that this filename already exist and ask me if I want to overwrite it?. For your information the statement I use to save the file is the following: €˜&&&&&&&&&&&&&&&&&&&&&&&&&&&&& Dim Boring As String Dim WO As String Dim depth As String WO = Worksheets("DEFAULTS").Range("C3") Boring = Worksheets("DEFAULTS").Range("C5") depth = Worksheets("DEFAULTS").Range("C6") ClienName = Worksheets("DEFAULTS").Range("C8") Progname = "S:\GEOTEST\shears\" & WO & "\" & Boring & " " & "@" & " " & depth & ".xls" €˜&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& Thanks in advance. Maperalia |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Warning Message | Excel Worksheet Functions | |||
warning message | Excel Discussion (Misc queries) | |||
How to prevent warning messages on protected work sheet. | Excel Worksheet Functions | |||
prevent warning message from appearing | Excel Programming | |||
warning message | Excel Programming |