Solved

how to change Change Excel Format?

Posted on 2002-07-11
3
945 Views
Last Modified: 2012-06-21
Hi How do I use VB to change Excel format from CSV to Excel Workbook with same filename?

I open it using Excel.Application
One way that work is that using SaveAs , and set file format to xlExcel9795, but the problem is that it will prompt a dialog "Do you want to overwrite it? Y/N/C".  I want it to automatic saved without display dialog, if file exist, just overwrite.

Or is there anyway to just change the fileformat of Excel CSV to Excel Workbook and saved.
0
Comment
Question by:AStronus
  • 3
3 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 200 total points
ID: 7147018
Use .displayalerts= false before save, save the file and then  reset to true from Excel.Application object.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7147020
Other possible way is check if file already exist, delete it and saveas normally.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7147048
Thanks for "A" grade.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

863 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

23 Experts available now in Live!

Get 1:1 Help Now