Visual Basic Tutorial – Point Edit – Step 1 code:


Private Sub Combo1_Click()
   Set srv = Servers(Combo1.Text)
End Sub

Private Sub Form_Load()
   Dim cur As Integer
   Dim dflt As Integer
   cur = 0
   dflt = 0
   For Each srv In Servers
      Combo1.AddItem srv.Name
      If srv.Name = Servers.DefaultServer.Name Then
         dflt = cur
      End If
      cur = cur + 1
   Next
   Combo1.ListIndex = dflt
   Set srv = Servers(Combo1.Text)
End Sub

  
Enabling Operational Intelligence