Hi
I am passed a text string from a dll which I split with vbcr, I know if no values are present but is there a way tell if there is only one.
Here is the code I use
Dim input_d As Variant
Dim i As Integer
Dim indexctr As String
On Error GoTo errhand
'load the index list for the camera list
tempstring = mgr.DataSources(sourceType
s_camera)
input_d = Split(tempstring, vbCr)
If Not IsNull(tempstring) Then
'unload the camera menu
frm_toolbar.mnusources(0).
Visible = True
For i = frm_toolbar.mnusources.cou
nt - 1 To 1 Step -1
Unload frm_toolbar.mnusources(i)
Next
frm_toolbar.mnusources(0).
Visible = True ' ensure at least one visible menu item to allow deletions
For i = LBound(input_d) To UBound(input_d)
frm_toolbar.mnusources(frm
_toolbar.m
nusources.
UBound).Ca
ption = input_d(i)
Load frm_toolbar.mnusources(frm
_toolbar.m
nusources.
UBound + 1)
Next i
frm_toolbar.mnusources(0).
Visible = False 'to ensure the first entry is not repeated in the list
If frm_toolbar.Label3.Caption
= text(4054) Then
frm_toolbar.Label3.Caption
= frm_toolbar.mnusources(0).
Caption
End If
load_camera_presets = True
Any help would be great
thanks
Start Free Trial