LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning Message bollard Excel Worksheet Functions 6 September 12th 07 05:59 PM
warning message allan Excel Discussion (Misc queries) 2 March 5th 07 03:20 AM
How to prevent warning messages on protected work sheet. Dannycol Excel Worksheet Functions 3 April 5th 06 09:07 PM
prevent warning message from appearing Tijmen Excel Programming 1 November 24th 05 10:12 AM
warning message Delali Excel Programming 1 June 25th 04 06:40 PM


All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"