Solved

Disable Mesage

Posted on 2012-03-15
2
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

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

Author Closing Comment

by:aneilg
ID: 37724340
sorted the problem out.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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