Group:  Microsoft Excel ยป microsoft.public.excel.interopoledde
Thread: COM Interop issue Excel 2000 & 2003

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

COM Interop issue Excel 2000 & 2003
Rick Humphrey 08.07.2006 15:43:01
Hi,

I am attempting to use VB.net to drive Excel 2000. So I add reference in my
project to MS XL Object Library 9.0... Everything is great, except here is
the issue....
The Box I'm developing on has Excel2000 & Excel2003 installed..... I want to
develop and deploy the project to the Excel2000 environment..... Is there an
easy way when I create the Excel.Application object to force it to open Excel
2000 and not Excel 2003?

Private Sub btnOpen_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnOpen.Click
Dim oXL As Excel.ApplicationClass
Dim oWkb As Excel.WorkbookClass
Dim oWkbs As Excel.Workbooks
Dim FileSpec As String = "E:\Documents and Settings\Rick\My
Documents\Visual Studio Projects\DriveExcel\PIData.xls"
oXL = CreateObject("Excel.Application") '***How to specify Excel
2000?
oXL.Visible = True
oWkbs = oXL.Workbooks
oWkb = oWkbs.Open(FileSpec)

End Sub

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net