473,406 Members | 2,387 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,406 software developers and data experts.

excel 2003 and VB.NET

Hi,

for several years i used the following code without any trouble. But it
seems that under VB.NET and with Excel 11 COM, it has some issues.

here is the code :
Public xlApp As Excel.Application
Public xlWB As Excel.Workbook
Public xlWS As Excel.Worksheet

'-----------------------------------------
' OpenXLSFile
'-----------------------------------------
Public Function OpenXLSFile(ByVal ExcelFile As String)
xlApp = New Excel.Application
xlApp.Visible = True
xlWB = xlApp.Workbooks.Open(ExcelFile)
...
xlWB.Close()
xlWB = Nothing
xlApp.Quit()
xlApp = Nothing
End Function

problem occue on Open function.
does anyone know why ?
i've never seen that.
thanks a lot,

Maileen
Nov 21 '05 #1
1 1214
Hi Maileen,

What is the error you run into?

Bernie Yaeger

"Maileen" <no*****@nospam.com> wrote in message
news:eZ**************@tk2msftngp13.phx.gbl...
Hi,

for several years i used the following code without any trouble. But it
seems that under VB.NET and with Excel 11 COM, it has some issues.

here is the code :
Public xlApp As Excel.Application
Public xlWB As Excel.Workbook
Public xlWS As Excel.Worksheet

'-----------------------------------------
' OpenXLSFile
'-----------------------------------------
Public Function OpenXLSFile(ByVal ExcelFile As String)
xlApp = New Excel.Application
xlApp.Visible = True
xlWB = xlApp.Workbooks.Open(ExcelFile)
...
xlWB.Close()
xlWB = Nothing
xlApp.Quit()
xlApp = Nothing
End Function

problem occue on Open function.
does anyone know why ?
i've never seen that.
thanks a lot,

Maileen

Nov 21 '05 #2

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

Similar topics

17
by: Mansi | last post by:
I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi
3
by: Atley | last post by:
I am trying to create a new spreadsheet in Excel using VB.net 2003. This application has to be useable by a range of users running anywhere from Excel 2000 to Excel XP to Excel 2003. My dev...
2
by: sherifffruitfly | last post by:
Hi, I'm using an adaptation of excel-reading code that's all over the internet - I don't much like or understand it, but it has worked for me in the past.... beggars can't be choosers... : ...
2
by: smtwtfs007 | last post by:
Guys, I am having problems with Excel 2000 to Excel 2003 dll in production. I am having version 2003 in my PC and I used the below code change to open password protected excel files in my...
4
by: =?Utf-8?B?THluZXJz?= | last post by:
Hello All, We have a VB.NET application writen using VS 2003. This application apens an excel file from a vendor, reads the data and performs whatever functions it needs. We recently upgraded our...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.