Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB.NET library for Excel

VB.NET library for Excel

Scheduled Pinned Locked Moved Visual Basic
helpcsharpvisual-studiocom
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BobbyStrain
    wrote on last edited by
    #1

    I have Excel 2007 installed on both my Windows 7 and Windows 8.1 computers. On Windows 7, a class library built with VS 2010, com visible, and registered for com works as expected. The class has the required interface to work with com. However, I copied the complete library project to the Windows 8.1 computer, and built the library with VS 2013. The library is properly registered and com visible and shows in the Excel VBA project as a reference. All the functionality is displayed through Excel's Object Explorer. But the VBA code fails with the line to set the object to to a new instance of the class. The error message given is that "class does not support automation or does not support expected interface". I have no idea how to fix the problem. I have tried everything I know to do without success. Here is the code snippet where the problem occurs. 1 Dim myPipe As TwoPhaseFlowCom next line fails 2 Set myPipe = New TwoPhaseFlowCom 3 Call myPipe.NewFlow(WV, DV, VV, WL, Dl, LV, STEN, D) I tried to register the dll built with VS 2010 on the Windows 7 machine on the Windows 8.1 machine. But all attempts to register failed. Any suggestions on how to remedy the problem is appreciated. Bobby

    CHill60C 1 Reply Last reply
    0
    • B BobbyStrain

      I have Excel 2007 installed on both my Windows 7 and Windows 8.1 computers. On Windows 7, a class library built with VS 2010, com visible, and registered for com works as expected. The class has the required interface to work with com. However, I copied the complete library project to the Windows 8.1 computer, and built the library with VS 2013. The library is properly registered and com visible and shows in the Excel VBA project as a reference. All the functionality is displayed through Excel's Object Explorer. But the VBA code fails with the line to set the object to to a new instance of the class. The error message given is that "class does not support automation or does not support expected interface". I have no idea how to fix the problem. I have tried everything I know to do without success. Here is the code snippet where the problem occurs. 1 Dim myPipe As TwoPhaseFlowCom next line fails 2 Set myPipe = New TwoPhaseFlowCom 3 Call myPipe.NewFlow(WV, DV, VV, WL, Dl, LV, STEN, D) I tried to register the dll built with VS 2010 on the Windows 7 machine on the Windows 8.1 machine. But all attempts to register failed. Any suggestions on how to remedy the problem is appreciated. Bobby

      CHill60C Offline
      CHill60C Offline
      CHill60
      wrote on last edited by
      #2

      Are there any run-time dependencies you might have missed? Try downloading the SysInternals Suite[^] from MS TechNet - it's free and incredibly useful for tracking down problems like this. Have a look at the Process Explorer and Process Monitor parts of the suite - doesn't take long to get up and running.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups