Use sendkeys in save as macro

 smd -

i've written a macro to copy the "temp" sheet of a workbook to a new workbook and then save tht workbook to an existing file. i get the "do you want to replace existing file" msg box. Using sendkeys i need to over ride the msg box so the user doesnt have to click yes everytime when running the macro.

help is much appreciated.

i also need to schedule a particular workbook and a macro in that book to be run every night at 12.

thanks in advance

1 reply

Try this.....

Sub test3()

Application.DisplayAlerts = False
ThisWorkbook.SaveAs Filename:="book2.xls"

End Sub
thanks so much guy,

need one more help though. i wrote teh macro to create a temp workbook and save it on a particular folder in the network. i need to open this main workbook automatically at 12midnight every day and run the macro which will generate tht temp workbook.

any help will sure be appreciated