Bonsoir à tous
Je suis nouveau sur visual studio 2010
Je voudrai developpé une petite application excel automatisé. J'ai ce code en vba
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Private Sub BtnOk_Click()
Dim Rech As Range
Dim ConfigUser As Byte
Static TentativePW As Byte, TentativeID As Byte
    If NomUtilisateur = Empty Or PasseWord = Empty Then mess_01
        Set Rech = Range("Users").Find(NomUtilisateur, LookIn:=xlValues, lookat:=xlWhole)
            If Not Rech Is Nothing Then
                If NomUtilisateur = Rech.Offset(0, 1) Then
                    ConfigUser = Rech.Offset(0, 2)
                       Autorisation ConfigUser
        Else
            TentativePW = TentativePW + 1
                    If TentativePW > 3 Then ThisWorkbook.Close 0
                        MsgBox "Mot de passe invalide, Tentative N° " & TentativePW & " Sur 3", vbCritical, "Sécurité Gestion parc"
                    With Me.PasseWord
                        .Value = ""
                        .SetFocus
                    End With
        End If
 
        Else
        TentativeID = TentativeID + 1
                If TentativeID > 3 Then ThisWorkbook.Close 0
                MsgBox "Utilisateur inconnu, , Tentative N° " & TentativeID & " Sur 3", vbCritical, "Sécurité Gestion parc"
                With Me.NomUtilisateur
                    .SetFocus
                    .SelStart = 0
                    .SelLength = Len(NomUtilisateur.Text)
                End With
    End If
 
End Sub
Je souhaiterai savoir comment l'utiliser mais en vb.net
Une piste ? Des conseils ?

Merci de m'aider.