S
Starbuck
Hi All
In one of my converted (VB6 to VB.Net) apps I have managed to remove all instances of -
Imports Microsoft.VisualBasic - except for one form which raises errors in regard to LBound and UBound, the code in queston is below.
Private Sub ReadUsedIDs()
cboIndex.Items.Clear()
Dim Indexies As Object
Dim Size As Long
Try
Indexies = pICalendarItemServ.GetAllUsedIds(pItemType)
Size = UBound(Indexies) - LBound(Indexies) + 1
Dim index As Integer
For index = LBound(Indexies) To UBound(Indexies)
cboIndex.Items.Add(CType(Indexies(index), String))
Next
If (UBound(Indexies) - LBound(Indexies) > -1) Then
cboIndex.Text = Indexies(LBound(Indexies))
cmdRead.Enabled = True
cboIndex.Enabled = True
Else
cmdRead.Enabled = False
cboIndex.Enabled = False
End If
Indexies = Nothing
Catch ex As Exception
End Try
End Sub
Is there another way of doing this.
Thanks in advance
In one of my converted (VB6 to VB.Net) apps I have managed to remove all instances of -
Imports Microsoft.VisualBasic - except for one form which raises errors in regard to LBound and UBound, the code in queston is below.
Private Sub ReadUsedIDs()
cboIndex.Items.Clear()
Dim Indexies As Object
Dim Size As Long
Try
Indexies = pICalendarItemServ.GetAllUsedIds(pItemType)
Size = UBound(Indexies) - LBound(Indexies) + 1
Dim index As Integer
For index = LBound(Indexies) To UBound(Indexies)
cboIndex.Items.Add(CType(Indexies(index), String))
Next
If (UBound(Indexies) - LBound(Indexies) > -1) Then
cboIndex.Text = Indexies(LBound(Indexies))
cmdRead.Enabled = True
cboIndex.Enabled = True
Else
cmdRead.Enabled = False
cboIndex.Enabled = False
End If
Indexies = Nothing
Catch ex As Exception
End Try
End Sub
Is there another way of doing this.
Thanks in advance