Automation type not supported in Visual Basic


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Automation type not supported in Visual Basic

  1. #1
    Jarno Guest

    Automation type not supported in Visual Basic


    Hi,

    Im 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,
    >
    >Im 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,
    >>
    >>Im 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,
    >>>
    >>>Im 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

    >>

    >



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center