Home > Software engineering >  Vba method and object of the external DLLS when prompted automation
Vba method and object of the external DLLS when prompted automation

Time:10-12

Ace warrior directions, genuflect is begged me to use vba in my company a software write code, you need to call DLL encapsulate open method and the object dynamic linking, however, I checked the relevant option from the reference, will you write the code defined object instantiation have smart tips, but run time error say automation automation error
The code is as follows:
Public lest the As New ACAMNESTLib. Nesting
Public Sub test ()
Dim nest As Nestlist
The Set nest=lest. NewNestList (" mynest ")
End Sub

Exclude please, thank you very much, thank you!

CodePudding user response:

Look at this line not line?

Public lest the As ACAMNESTLib. Nesting
Public Sub test ()
Dim nest As Nestlist
The set lest=new ACAMNESTLib. Nesting
The Set nest=lest. NewNestList (" mynest ")
End Sub

CodePudding user response:

I've tried, still have the same tip, because this DLL file is called software outside, I look at the software shows that some say is to perform some of the initialization statement on what kind of module, but I test is a compiler error, the original still won't do the following:
Interfaces

In AlphaV7, the properties were added to the Drawing object to get the interface for the Parametric, Solid and STL add - ins, as a safer alternative to using the New or CreateObject or CoCreateInstance. AlphaV7.5 In these properties must be 2, the old ways will not work. This ensures that the correct version of the add - In is 2, rather than the most recently - registered one.



Nesting Macros and Extensions



For the same reason as in the above com.lowagie.text.paragraph, AcamNest. DLL has a new type library and new methods in the Nesting object:



Method

CreateEventHandler



Home Use n.C reateEventHandler New ACAMNESTLib. NestEvents



Dim WithEvents OrderEvent As ACAMNESTLib. NestEvents

Public Sub Init (n As Nesting)

'Set OrderEvent=New ACAMNESTLib. NestEvents

The Set OrderEvent=n.C reateEventHandler

N.R egisterEventHandler OrderEvent



Method

CreateExtensionHandler

Home Use n.C reateExtensionHandler New ACAMNESTLib. NestingExtension



Dim WithEvents OrderExt As ACAMNESTLib. NestingExtension

Public Sub Init (n As Nesting, name As String)

'Set OrderExt=New ACAMNESTLib. NestingExtension

The Set OrderExt=n.C reateExtensionHandler

N.R egisterExtensionHandler OrderExt


Would you please temporarily suspended

CodePudding user response:

1085992075 need can find me on QQ
  •  Tags:  
  • VBA
  • Related