Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Location
    Sydney
    Posts
    15

    Unanswered: Modifying Excel Worksheets from VB

    I'm having problems modifying data in an excel worksheet from my VB program on an NT system. It works fine through the use of the GetObject() function and simply modifying the worksheet (e.g x.WorkSheets("x2").Range("x3").Value = x4) on my XP machine but i get a runtime error 'Automation Error - Incompatible version of the RPC Stub'

    Any ideas?

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    This article may help:

    Article

    Is the xp machine the same machine where you create your programs ?
    Does this error occur on all nt machines ?
    Can you send your code ?

  3. #3
    Join Date
    May 2002
    Location
    Sydney
    Posts
    15
    Thanks for the help....

    i've fixed that problem....problem when it packaged XP .dll's on NT stuffed things up. But now i have another problem on a 95 machine says ActiveX component can't create object when trying to connect to the spreadsheet.

    The code was built on my XP machine for connection to Access 2000 and Excel 2002. The 95 machine has access on it but not excel, but i assumed that when i used deployment that the drivers would be packaged?

    Code:

    On Error GoTo Err2
    Dim exwk As Workbook
    Dim exwk2 As Workbook
    ...
    exName1 = "Product Costing - Criteria.xls"
    exName2 = "Product Costings-ver3.xls"
    ....
    exwk.Worksheets("New Costings").Range("C3").Value = 4 'Produces error
    ....

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    MS give something away for free ? Shame, shame, shame :-). Big Bill has to reach the 100 billion mark next year. But seriously, you hit the nail on the head - the 95 client needs excel installed. The error you received basically means that the object has not been registered and since it was not installed ...

    The following is a helpful article that goes into more detail:
    MS Article

    Good luck.

Posting Permissions

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