Article ID: 159426
Article Last Modified on 10/28/2006
Private Sub Command1_Click()
Dim i As Integer
For i = 0 To 10
ListBox1_Ctrl.AddItem "Item " & i
Next i
End Sub
Public Function CreateVariant() As Variant
Dim varRet As Variant
Dim strTemp() As String
ReDim strTemp(ListBox1_Ctrl.ListCount) As String
Dim i As Integer
For i = 0 To ListBox1_Ctrl.ListCount - 1
strTemp(i) = ListBox1_Ctrl.List(i)
Next i
CreateVariant = strTemp 'store an array into a variant
End Function
ListBox1_Ctrl_Val = CreateVariant
Call SetMapiProp(ctlSubject.Text, "MAPI_Subject_Custom",vbString, Msg)
If (VarType(varTemp) And vbArray) = vbArray Then varTemp = varTemp(0)
Public Sub SetListBoxValue(ByVal var As Variant, ctl As Control, _
inType As Integer)
Dim Index As Integer
Dim lstMost As Integer
If IsNull(var) Then Exit Sub
If VarType(var) < vbArray Then Exit Sub
ctl.Clear
lstMost = UBound(var)
For Index = 0 To lstMost - 1
ctl.AddItem var(Index)
Next Index
End Sub
Additional query words: Eforms VB Eform
Keywords: kbhowto kbusage KB159426