overwriting a file

  • Thread starter Thread starter Jordan Shoderu
  • Start date Start date
J

Jordan Shoderu

i have code written in VBA and at the end of the code i have this


ChDir "E:\Joss Blaze\temp"
ActiveWorkbook.SaveAs Filename:="E:\Joss
Blaze\temp\temp.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

MsgBox "Extraction Successful Proceed To Access", vbInformation,
"Info."
ActiveWorkbook.Close
Application.Quit
Excel.Application.Quit

can anyone tell me how to overwrite the temp file automaticallywith out
having to click yes while the messege "this files already exists do you want
to overwrite...."

thank you

jordan
 
i got an error messege which is

Run-time error '438':

Object doesn't support this property or method

what can i do now
 
Hi
try
application.displayevents=false
'your code
application.displayevents=true
 
Frank Kabel said:
Hi
try
application.displayevents=false
'your code
application.displayevents=true


I think you mean Application.DisplayAlerts NOT displayevents

Keith
 
Hi
as Keith already mentions I used the wrong name. Make this
application.displayalerts = ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SaveAs to existing file 5
Simplify save code 11
Accept Overwrite Automatically 1
Hiding an Excel file using VBA 1
Enable/Disable Macro 2
Save as marco 3
Save As File Format 1
Saving a workbook to an iKnow portal 2

Back
Top