Why doesn't code work in VB.net, but works in VBA; GetObject

后端 未结 3 1508
梦谈多话
梦谈多话 2021-01-22 14:38

VBA code works great:

Sub testVBA()

    Dim wb As Object \' Lotus123.Document
    Set wb = GetObject(\"S:\\Temp\\T\\0375D.WK3\", \"Lotus123.Workbook\")

End Sub         


        
3条回答
  •  失恋的感觉
    2021-01-22 14:54

    First of all, check to make sure your inclusions (I think under Tools menu, includes or references or something like that) include the library that references Lotus123.Document. Chances are it's in the "Microsoft Excel 14.0 Object Library" or similar.

    I've heard it said that VB is not VBA!

提交回复
热议问题