Results 1 to 5 of 5

Thread: Error 458

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Brisbane, Australia
    Posts
    3

    Question

    I am using VB6 and transferring data to an MS Excel 97 spreadsheet.

    The prob is when I create an instance of XL:

    Global gobjXLApp as Excel.Application 'Done in Global.bas

    Set gobjXLApp = New Excel.Application 'done in frmMain.frm
    'or alternatively I have used...
    Set gobjXLApp = CreateObject("Excel.Application")
    'The Excel 8.0 Object library is referenced

    while either of the above methods works on my PC a PC here at work has the following error.

    "Error 458: Variable uses an Automation type not supported in Visual Basic."

    This error is caused by either of the above methods, but only on this one PC?

    Both the PC I developed this code on and the troubled PC are running VB6 SP4, NT4 SP5, Office 97 SR2. Any ideas??

    Cheers.

  2. #2
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186
    Hi there,

    Does the PC at your work have installed Excel on it?

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Brisbane, Australia
    Posts
    3

    Thumbs up

    Yep! Excel 97 is installed.

    I have downloaded a couple of VB-Excel automation examples from the web and they have the same error on this particular PC.. so I am thinking of getting my hands on the MS Office 97 CD and re-installing (the problem is obviously not with my code but rather the PC?).

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Location
    Brisbane, Australia
    Posts
    3

    Smile

    I have re-installed Office 97. No more problem!

    Cheers.

  5. #5
    Addicted Member
    Join Date
    Jun 1999
    Location
    Los Angeles
    Posts
    186
    Allrighty!!!
    Congratulations

    André

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width