adding reference to an COM-object in VB doesn't work

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • diego

    #1

    adding reference to an COM-object in VB doesn't work

    I have the follwing problem. I want to add a reference to an COM-
    object ("ek1.exe").

    In Excel-VBA it works without any problems.


    In MS Visual Studio 2005 VB this doesn't work and I get the error
    message:
    "A reference to 'z:\ek.exe' could not be added. Please make sure that
    the file is accessible, and that is a valid assembly or COM
    component."


    Any help is highly appreciated.


    Thanks in advance!
    Diego


    p.s.: I use follwing versions:
    Microsoft Visual Studio 2005
    Version 8.0.50727.762 (SP.050727-7600)
    Microsoft .NET Framework
    Version 2.0.50727


    Excel 2003 (11.8134.8132) SP2

  • Michel Posseth  [MCP]

    #2
    Re: adding reference to an COM-object in VB doesn't work

    Wel if it works in VBA through COM it should also work in VB.Net

    i guess you are trying late binding in VB.net ??? maybe you could post the
    code that fails

    object ("ek1.exe"). in VB should be at least a createobject("f oo")

    VBA ISNOT VB :-) ( a German and a Dutchman might look the same and there
    language sounds simular
    for a foreigner , but put them both in one room and if they both speak good
    English they end up talking in this language to each other )

    hth

    Michel






    "diego" <ernst.karner@g mail.comschreef in bericht
    news:1188210892 .502009.157800@ 22g2000hsm.goog legroups.com...
    >I have the follwing problem. I want to add a reference to an COM-
    object ("ek1.exe").
    >
    In Excel-VBA it works without any problems.
    >
    >
    In MS Visual Studio 2005 VB this doesn't work and I get the error
    message:
    "A reference to 'z:\ek.exe' could not be added. Please make sure that
    the file is accessible, and that is a valid assembly or COM
    component."
    >
    >
    Any help is highly appreciated.
    >
    >
    Thanks in advance!
    Diego
    >
    >
    p.s.: I use follwing versions:
    Microsoft Visual Studio 2005
    Version 8.0.50727.762 (SP.050727-7600)
    Microsoft .NET Framework
    Version 2.0.50727
    >
    >
    Excel 2003 (11.8134.8132) SP2
    >

    Comment

    Working...