Avatar of aneilg
aneilg
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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()
VB Script

Avatar of undefined
Last Comment
aneilg

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
aneilg

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
aneilg

ASKER
sorted the problem out.
Your help has saved me hundreds of hours of internet surfing.
fblack61