Bonjour à tout le forum,
Débutant en visual basic, et j'utilise visual studio 2012, je créer des petits forms sous windows.
Une petite question j'ai essayer de faire une boucle sur 3 combobox. Si une est vide alors il met un msgbox. Mais forcement ca marche pas!!!
Ci-joint le code :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 Public Class Form1 Private Property ComboBox As Integer Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim i As Integer For i = 1 To 3 If ComboBox & i = "" Then MsgBox("Aucune donnée n' a étais rentrée", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, "Erreur") End If Next TextBox1.Text = "Nom n°1 " & ComboBox1.Text & vbCrLf & "Nom n°2 " & ComboBox2.Text & vbCrLf & "Nom n°3 " & ComboBox3.Text End Sub End Class
Merci à tous pour vos réponse .