Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual studio 2005 vb2005/.net Interops problem

Status
Not open for further replies.

Yooooda

Technical User
Jun 19, 2006
5
0
0
US
I am trying to write some small application in VB code in Visual Studio 2005. The programs need to be able to connect to both Access and Excel simultaneously. If I use the Imports microsoft.office.interops.excel by itself, I can use Dim oexcel as new excel.application and it works fine. When I add Imports microsoft.office.interops.excel it no longer likes the dim statement and any attempt to add an Access application results in an ambiguous application error.
Why can't I have new excel.application AND new access.application?
Thanks.
 

If I use the [blue]Imports microsoft.office.interops.excel[/blue] by itself, I can use Dim oexcel as new excel.application and it works fine. When I add [blue]Imports microsoft.office.interops.excel [/blue]

Why do you Imports microsoft.office.interops.excel twice, and Access none?


Have fun.

---- Andy
 
Oops. Why the world still needs proofreaders.
I meant Imports Microsoft.office.interops.ACCESS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top