473,396 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

In my vb.net application Excel get freeze after closing a workbook

Hi,

We have an application that create an excel object on the very
beginning of the application:

objExcel = New Excel.Application

Then I am passing the excel reference to the one of forms that on the
button click event creates workbook, sheet, fills sheet with data and
gives the control to the user.

oWB = objExcel.Workbooks.Add
oWB.Sheets(1).Select()
oSheet = oWB.ActiveSheet
……
……
objExcel.Visible = True
objExcel.UserControl = True
objExcel.Application.DisplayAlerts = True

And on the end when I am closing the application I kill the excel:
System.Runtime.InteropServices.Marshal.ReleaseComO bject(objExcel).
But some users have a problem. When they close workbook that has been
created by the application excel get freeze and they cannot open any
new excel object.

Any help would be appreciated

Thanks,

Sanja
Nov 21 '05 #1
0 1266

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Geert-Pieter Hof | last post by:
Hello, I have written an application in Visual Basic 6.0 Professional SP5 that reads data from an Excel workbook by using ADO. When I close the application, I get the error: 'The instruction...
8
by: ChrisBowringGG | last post by:
When you use Application.Quit() on an Excel application, there can still be an instance of Excel running, as seen in Task Manager. You can try following the advice on MSDN: ...
1
by: Bernd Muent | last post by:
Hi together, I am using the following code in Visual Basic to open Word or Excel applications: Word: Dim w As Word.Application w = CType(CreateObject("Word.application"), Word.Application)...
7
by: SteveS | last post by:
I'm attempting to close EXCEL from within my VB.NET application. Using the excel object library to write data to my spreadsheet is working fine but when I try to quit application object it does not...
0
by: Jono | last post by:
Hello, I've been getting this message when closing excel (not necessarily when closing the workbook by itself, but when closing Excel and the workbook at the same time): ...
0
by: Dr. Patrick Havel | last post by:
Hello newsgroup, I have written an Excel Workbook project in VC#. I want to get the event when the APPLICATION (something like MFCs OnClose()) is closing. It is no problem for me to get this for...
9
by: Doug Glancy | last post by:
I got the following code from Francesco Balena's site, for disposing of Com objects: Sub SetNothing(Of T)(ByRef obj As T) ' Dispose of the object if possible If obj IsNot Nothing AndAlso...
10
by: N2Deep | last post by:
I have a macro that does a few things to an Excel workbook and then saves, and closes to an Excel workbook. I now want to save, close the Excel workbook as a text (tab delimited .txt) file. ...
2
by: Silgd1 | last post by:
Hi All.... I'm using python 2.4, Win XP Pro v.2002 sp3, and I use pyscripter 1.9.9.2 as my editor. I have written code to open an existing excel file and grab some data. The problem I am...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.