Solved

Disable Mesage

Posted on 2012-03-15
2
227 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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