DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Jarno Guest

    Automation type not supported in Visual Basic


    Hi,

    I´m trying to load Excel from Visual Basic 6.0 wiht the following command:
    Set objExcel = new Excel.Application

    This command line generates: "Run-time error '458': Variable uses an Automation
    type not supported in Visual Basic."

    Does anyone have a clue how to solve this?

    The client uses Office97 on win98 platform.

    Regards,
    Jarno

  2. #2
    Craig Brown Guest

    Re: Automation type not supported in Visual Basic


    Jarno,

    Check in Project/References and see that you have included the Microsoft
    Excel library in your project.

    Craig Brown

    "Jarno" <jarno.nieminen@askus.se> wrote:
    >
    >Hi,
    >
    >I´m trying to load Excel from Visual Basic 6.0 wiht the following command:
    >Set objExcel = new Excel.Application
    >
    >This command line generates: "Run-time error '458': Variable uses an Automation
    >type not supported in Visual Basic."
    >
    >Does anyone have a clue how to solve this?
    >
    >The client uses Office97 on win98 platform.
    >
    >Regards,
    >Jarno



  3. #3
    jarno Guest

    Re: Automation type not supported in Visual Basic


    I have a reference to "Microsoft Excel 8.0 Object Library".

    /Jarno

    "Craig Brown" <cbrown.consulting@snet.net> wrote:
    >
    >Jarno,
    >
    >Check in Project/References and see that you have included the Microsoft
    >Excel library in your project.
    >
    >Craig Brown
    >
    >"Jarno" <jarno.nieminen@askus.se> wrote:
    >>
    >>Hi,
    >>
    >>I´m trying to load Excel from Visual Basic 6.0 wiht the following command:
    >>Set objExcel = new Excel.Application
    >>
    >>This command line generates: "Run-time error '458': Variable uses an Automation
    >>type not supported in Visual Basic."
    >>
    >>Does anyone have a clue how to solve this?
    >>
    >>The client uses Office97 on win98 platform.
    >>
    >>Regards,
    >>Jarno

    >



  4. #4
    Van Guest

    Re: Automation type not supported in Visual Basic


    Hi Jarno,
    This is a way I did it for an existing Workbook(can also use GetObject for
    existing:

    Dim excBk As excel.Workbook
    Dim strPath As String
    Dim excObj As excel.Application
    Set excObj = CreateObject("Excel.Application")

    strPath = App.Path
    strFile = "WorkbookName.xls"
    Screen.MousePointer = vbHourglass
    With excObj
    .Visible = True
    .WindowState = xlMaximized
    .Workbooks.Open strPath & "\" & strFile
    'Set excBk = GetObject(strPath & "\[" & strFile & "]", "Excel.Sheet")
    End With

    Hope this helps,God bless
    Van
    "jarno" <jarno.nieminen@askus.se> wrote:
    >
    >I have a reference to "Microsoft Excel 8.0 Object Library".
    >
    >/Jarno
    >
    >"Craig Brown" <cbrown.consulting@snet.net> wrote:
    >>
    >>Jarno,
    >>
    >>Check in Project/References and see that you have included the Microsoft
    >>Excel library in your project.
    >>
    >>Craig Brown
    >>
    >>"Jarno" <jarno.nieminen@askus.se> wrote:
    >>>
    >>>Hi,
    >>>
    >>>I´m trying to load Excel from Visual Basic 6.0 wiht the following command:
    >>>Set objExcel = new Excel.Application
    >>>
    >>>This command line generates: "Run-time error '458': Variable uses an Automation
    >>>type not supported in Visual Basic."
    >>>
    >>>Does anyone have a clue how to solve this?
    >>>
    >>>The client uses Office97 on win98 platform.
    >>>
    >>>Regards,
    >>>Jarno

    >>

    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links