Solved

Disable Mesage

Posted on 2012-03-15
2
222 Views
Last Modified: 2012-03-15
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()
0
Comment
Question by:aneilg
  • 2
2 Comments
 

Accepted Solution

by:
aneilg earned 0 total points
Comment Utility
sorted moved objExcel.DisplayAlerts = False a couple of lines down.
0
 

Author Closing Comment

by:aneilg
Comment Utility
sorted the problem out.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I met Paul Devereux (@pdevereux) today when I responded to his tweet asking “Anybody know how to automate adding files from disk to a folder in #outlook  ?”.  I replied back and told Paul that using automation, in this case scripting, to add files t…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now