User`s guide
D Utility Library
D-8
Dim aUtil As Object
Dim v As Variant
Dim R1 As Range
Dim R2 As Range
Dim R3 As Range
Dim R4 As Range
On Error GoTo Handle_Error
Set aClass = CreateObject("mycomponent.myclass.1_0")
Set aUtil = CreateObject("MWComUtil.MWUtil")
Set R1 = Range("A1")
Set R2 = Range("B1")
Set R3 = Range("C1")
Set R4 = Range("D1")
Call aClass.randvectors(4, v)
Call aUtil.MWUnpack(v,0,True,R1,R2,R3,R4)
Exit Sub
Handle_Error:
MsgBox (Err.Description)
End Sub
Sub MWDate2VariantDate(pVar)
Converts output dates from MATLAB to Variant dates.
Parameters.
Return Value.
None.
Remarks. MATLAB handles dates as double precision floating point numbers
with 0.0 representing 0/0/00 00:00:00 (See “Data Conversion Rules” on
page B-2 for more information on conversion between MATLAB and COM date
values). By default, numeric dates that are output parameters from compiled
MATLAB functions are passed as
Doubles that need to be decremented by the
COM date bias as well as coerced to COM dates. The
MWDate2VariantDate
Argument Type Description
pVar Variant
Variant
to be converted.