Hi everyone,
I have a program that opens an Excel file, reads data from it, then closes the open workbook. But when I exit my program and go to edit that Excel file, it won't let me open it. When I double click it, the screen blinks for a fraction fo second but nothing opens. I have a suspicion that VB isn't properly closing the Excel file, eventhough I put the following statement at the end of my code: - ApExcel.ActiveWorkbook.Close, "C:\File.xls"
Any suggestions?
Thanks :)
Wayne.
4 2691
This same problem was reported here recently, and I think the answer was to properly release all the references to Excel objects (you know, things like Set ... = Nothing). Try a search, using the search box at top-right.
Hi everyone,
I have a program that opens an Excel file, reads data from it, then closes the open workbook. But when I exit my program and go to edit that Excel file, it won't let me open it. When I double click it, the screen blinks for a fraction fo second but nothing opens. I have a suspicion that VB isn't properly closing the Excel file, eventhough I put the following statement at the end of my code: - ApExcel.ActiveWorkbook.Close, "C:\File.xls"
Any suggestions?
Thanks :)
Wayne.
This should work:
[PHP]ApExcel.ActiveWorkbook.Close, "C:\File.xls"
ApExcel.Quit[/PHP]
Good Luck.
The .Quit command works perfectly. Thank you very very very much! :) Case closed.
Wayne.
This should work:
[PHP]ApExcel.ActiveWorkbook.Close, "C:\File.xls"
ApExcel.Quit[/PHP]
Good Luck.
The .Quit command works perfectly. Thank you very very very much! :) Case closed.
Thanks for that, iburyak. I remember seeing this stuff recently, but I'm often too busy to go searching.
Glad we could help, Wayne.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Lize |
last post by:
Hi,
I'm writing an ASP application to open an excel workbook, then run a
macro stored in the excel file, which produces outputs that will be
displayed back onto my ASP application.
Now the...
|
by: brazilnut52 |
last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better
I have created a simple COM DLL in .NET by using the COM class...
|
by: cpeters5 |
last post by:
Deaa group,
I am using SQLServer 2000 in an XP Sp2. I would like to do the
following:
I have a program running on a database server that generates some data
which are loaded to the database....
|
by: I Decker |
last post by:
Hi all,
Hope this is the right group.
I am writing a program in c# to open create an excel document, enter
some data, save it and then email it as an attachment. I have
successfully created...
|
by: gizmo |
last post by:
I have a requirement to initiate more than one instance of an
application using the filenames. (the example below will start two
instances of MS Word).
My problem is that I need to kill each...
|
by: D. Shane Fowlkes |
last post by:
This most likely belongs in another forum but I thought I'd start here. I
have a COM Object written in VB6. The DLL will access MS Excel and use it's
Object Library to write a customized report...
|
by: Fendi Baba |
last post by:
I created an ASP.net page which opens excel. This works fine in Office
2007. However, Excel 2003 runs in an error which states "cannot read
output file".
Hee is the VB code and below is the ASPX...
|
by: evenlater |
last post by:
I have an Access 2007 application running on a terminal server. One of
the features of the app is a wizard that allows them to create an
Excel spreadsheet by querying the Access data. When they...
|
by: Reggie |
last post by:
Hi And TIA. Running VS2005 and IIS7.0. I have a procedure that copies a
file to a folder in my web application. When I run the project from VS it
runs fine . I'm usin IE as default viewer. But...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |