Click or drag to resize

IExportEngineCOMEvents Interface

Interface for COM clients to implement events raised by this asssembly.

Namespace:  Vovin.CmcLibNet.Export
Assembly:  Vovin.CmcLibNet (in Vovin.CmcLibNet.dll) Version: 1.0.7729.42686
Syntax
public interface IExportEngineCOMEvents

The IExportEngineCOMEvents type exposes the following members.

Methods
  NameDescription
Public methodExportCompleted
Export completed
Public methodExportProgressChanged
Represents a batch of rows read from Commence.
Top
Remarks
When used in VBA (Microsoft Office macros) you have to be very specific as to how to implement the events:
VB
'Create a class module called 'Class1'
'Declare the assembly using the WithEvents keyword.
Private WithEvents cmclibnet as Vovin_CmcLibNet.ExportEngine
Sub DoExport ' have a method that performs export
    Set cmclibnet = New Vovin_CmcLibNet.ExportEngine
    'do something
    'cmclibnet.ExportView(..) ..
    'cmclibnet.ExportCategory(..) ..
    cmclibnet.Close
End Sub

'Subscribe to the event
'The sender argument has to be of type Variant, not Object.
'Also, do not leave ByVal out, and do not use ByRef.
Private Sub cmclibnet_ExportProgressChanged(ByVal sender As Variant, ByVal args As ExportProgressChangedArgs)
    Debug.Print args.CurrentRow
End Sub

In a regular module, you would use this as:

VB
Sub Test
    Dim x As New Class1
    Call x.DoExport
End Sub
See Also