Solved

Excel & CD

Posted on 2004-10-26
167 Views
Last Modified: 2010-05-02
I've created a VB application that reads an Excel spreadsheet to fill out the label.  
Everything works until I burn it to a CD.

Here's what's happening:
1.  The CD starts up fine
2.  Click "Commercial" section, this reads an Excel spreadsheet and fills out the necessary labels
3.  Click on a label, this reads the same Excel spreadsheet and then opens a desired file          
     I get the following mesagges everytime: "A file named 'CommercialEnglish.xls' already exists in this location. Do you want to replace it?"
   
     If you click "YES" it works
     If you click "NO" it causes an error

Is there a way to automatically overwright without this prompt?
Thanks for the help.
0
Question by:eciabattari
    1 Comment
     
    LVL 48

    Accepted Solution

    by:
    Set xlApp = New Excel.Application
    Set xlWb = xlApp.Workbooks.Open(“C:\Temp\temp.xls”)
    Set xlWs = xlWb.Worksheets(1)

    xlApp.DisplayAlerts = False  'Here it is
    xlWB.Save
    xlApp.DisplayAlerts = True
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT Security CISA, CISSP & CISM Certification

    Master the advanced techniques required to protect network resources from external threats with the IT Cyber Security bundle. Built around industry best-practice guidelines, the IT Cyber Security bundle consists of three in-depth courses.

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    884 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

    14 Experts available now in Live!

    Get 1:1 Help Now