Olha que complicação pra criar um Hash:
Sub aaa()
Set d = CreateObject("Scripting.dictionary")
d.Add "A", "B"
d.Add "C", "D"
a = d.items
b = d.keys
For i = 0 To d.Count - 1
MsgBox a(i) & ", " & b(i)
Next i
End Sub
Em Perl, bastaria %aaa = ( )....
Bug Journal: VBA e Perl!
Sub aaa()
Set d = CreateObject("Scripting.dictionary")
d.Add "A", "B"
d.Add "C", "D"
a = d.items
b = d.keys
For i = 0 To d.Count - 1
MsgBox a(i) & ", " & b(i)
Next i
End Sub
Dim x As Integer
For x = 1 To cboBox1.ListCount
cboBox1.RemoveItem 0
Next x
Set Mat = Worksheets("Banco_Sistema").Range("E:E").Find(txtMat.Text)Procuramos o texto colocado no txtBox, e retornamos o Value da primeira célula à direita.
If Mat Is Nothing Then
Dim Resposta As Integer
Resposta = MsgBox("Servidor não encontrado!! Deseja adicioná-lo manualmente?", vbYesNo)
Select Case Resposta
Case vbYes
txtNome.Visible = True
labNomeServidor.Visible = False
Case vbNo
txtMat.Text = ""
labNomeServidor.Caption = "Nome do Servidor"
txtNome.Text = ""
txtNome.Visible = False
labNomeServidor.Visible = True
End Select
Else
enderecoMat = Mat.Address(False, False) 'Referencia relativa
Dim Resposta2 As Integer
Resposta2 = MsgBox("Por favor, confirme os dados do servidor selecionado:" & vbNewLine & vbNewLine & "Matrícula: " & txtMat.Text & vbNewLine & "Nome: " & Mat.Offset(0, 1), vbYesNo)
Select Case Resposta2
Case vbYes
labNomeServidor.Caption = Mat.Offset(0, 1)
Case vbNo
labNomeServidor.Caption = "Nome do Servidor"
txtNome.Text = ""
Mat = ""
End Select
End If