Disable Mesage

I am using a script task manager vba code, to remove a password from an excel file, but the problem is i get a message saying if want to replace the original file.

is there a way to disable the message when i run my stm.

        Dim objExcel As Object
        Dim objWorkbook As Object

        objExcel = CreateObject("Excel.Application")

        objExcel.Visible = False
        objExcel.DisplayAlerts = False

        objWorkbook = objExcel.Workbooks.Open("C:\Development\Dashboard Feeds\???20120210.xls", , , , "test")

        objWorkbook.Password = ""
        objWorkbook.SaveAs("C:\Development\Dashboard Feeds\???20120210.xls")

        objExcel.Quit()
aneilgAsked:
Who is Participating?
 
aneilgConnect With a Mentor Author Commented:
sorted moved objExcel.DisplayAlerts = False a couple of lines down.
0
 
aneilgAuthor Commented:
sorted the problem out.
0
All Courses

From novice to tech pro — start learning today.