Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Excel & CD

Posted on 2004-10-26
Medium Priority
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.
Question by:eciabattari
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
1 Comment
LVL 48

Accepted Solution

Mikal613 earned 2000 total points
ID: 12411585
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
xlApp.DisplayAlerts = True

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

618 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