Using VB.NET to control Excel and Access, etc.

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

    Using VB.NET to control Excel and Access, etc.

    I'm trying to use VB.NET to control Excel and Access, but finding it very
    slow going. I've just downloaded an Excel sample project from
    msdn.microsoft. com/office/understanding/excel/codesamples/default.aspx, but
    when I try to run it I get 91 errors, starting with
    "C:\Downloads\v bnet\excel\This Workbook.vb(3): Namespace or type 'Excel' for
    the Imports 'Microsoft.Offi ce.Interop.Exce l' cannot be found."
    This is crazy! How much use is an example that throws up errors like this?
    I'm running VB.NET 2003 Standard, so ius there something missing in my
    installation?

  • Chris, Master of All Things Insignificant

    #2
    Re: Using VB.NET to control Excel and Access, etc.

    Sounds like you did not add a reference to the excel dll in your project.
    Do you have Excel installed on your PC?

    Chris


    "Jim Wyse" <JimWyse@discus sions.microsoft .com> wrote in message
    news:F15FAAF9-D4DE-4D62-BDA7-05EEFD9D04E3@mi crosoft.com...[color=blue]
    > I'm trying to use VB.NET to control Excel and Access, but finding it very
    > slow going. I've just downloaded an Excel sample project from
    > msdn.microsoft. com/office/understanding/excel/codesamples/default.aspx,
    > but
    > when I try to run it I get 91 errors, starting with
    > "C:\Downloads\v bnet\excel\This Workbook.vb(3): Namespace or type 'Excel'
    > for
    > the Imports 'Microsoft.Offi ce.Interop.Exce l' cannot be found."
    > This is crazy! How much use is an example that throws up errors like this?
    > I'm running VB.NET 2003 Standard, so ius there something missing in my
    > installation?
    >[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Using VB.NET to control Excel and Access, etc.

      Jim,

      "Jim Wyse" <JimWyse@discus sions.microsoft .com> schrieb:[color=blue]
      > I'm trying to use VB.NET to control Excel and Access, but finding it very
      > slow going. I've just downloaded an Excel sample project from
      > msdn.microsoft. com/office/understanding/excel/codesamples/default.aspx,
      > but
      > when I try to run it I get 91 errors, starting with
      > "C:\Downloads\v bnet\excel\This Workbook.vb(3): Namespace or type 'Excel'
      > for
      > the Imports 'Microsoft.Offi ce.Interop.Exce l' cannot be found."
      > This is crazy! How much use is an example that throws up errors like this?[/color]

      Maybe the following article helps you to solve the problem:

      HOWTO: Automate Microsoft Excel from Visual Basic .NET
      <URL:http://support.microso ft.com/?scid=kb;EN-US;301982>

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

      Comment

      • Jim Wyse

        #4
        Re: Using VB.NET to control Excel and Access, etc.

        Yes, I have Office XP installed.
        I have added the reference to Microsoft Excel 10 Object Library, and
        Microsoft Office 10 Object Library, and now I get squigglies under
        Excel.Applicati on, Excel.Workbook, Excel.Worksheet , and Excel.Range, plus any
        refernce to Excel.

        "Chris, Master of All Things Insignifican" wrote:
        [color=blue]
        > Sounds like you did not add a reference to the excel dll in your project.
        > Do you have Excel installed on your PC?
        >
        > Chris
        >
        >
        > "Jim Wyse" <JimWyse@discus sions.microsoft .com> wrote in message
        > news:F15FAAF9-D4DE-4D62-BDA7-05EEFD9D04E3@mi crosoft.com...[color=green]
        > > I'm trying to use VB.NET to control Excel and Access, but finding it very
        > > slow going. I've just downloaded an Excel sample project from
        > > msdn.microsoft. com/office/understanding/excel/codesamples/default.aspx,
        > > but
        > > when I try to run it I get 91 errors, starting with
        > > "C:\Downloads\v bnet\excel\This Workbook.vb(3): Namespace or type 'Excel'
        > > for
        > > the Imports 'Microsoft.Offi ce.Interop.Exce l' cannot be found."
        > > This is crazy! How much use is an example that throws up errors like this?
        > > I'm running VB.NET 2003 Standard, so ius there something missing in my
        > > installation?
        > >[/color]
        >
        >
        >[/color]

        Comment

        Working...