View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fan924 Fan924 is offline
external usenet poster
 
Posts: 238
Default Check before overwriting file?

I am using the following to select a file name and then open file for
writing. It writes to the filename even if it is already used. Is
there a way to have it check before overwriting file? Examples?
________________________________

SaveFileName = Application.GetSaveAsFilename("C:\My Documents
\temp.hex", _
"Hex File (*.hex), *.hex", , "Save File As:")

Open SaveFileName For Output As #1
________________________________