Dim somme As Decimal For i As Integer = 1 To 10 Dim testvaleur As String = Me.Controls("Cel" & i.ToString("000")).Text Dim resultat As Decimal If Decimal.TryParse(testvaleur, resultat) Then somme += resultat End If Next
Dim Cel(556) As TextBox ' création des textbox nommé CelXXX' For i = 1 To 5 If i 1 Then deporte3 0 If i > 1 Then deporte3 = (22 * 5 + 9) * (i - 1) For j = 1 To 5 For k = 0 To 5 If k = 0 Then deporte1 = 0 deporte2 = 0 End If If k 1 Then deporte1 15 If k 2 Then deporte2 6 n = i & j & k Cel(n) = New TextBox TabPage2.Controls.Add(Cel(n)) Cel(n).Location = New Point(158 + deporte1 + deporte2 * (k - 1) + 70 * k, 62 + 22 * (j - 1) + deporte3) Cel(n).Size = New Point(70, 22) Cel(n).Font = New System.Drawing.Font("Calibri", 9, FontStyle.Bold) Cel(n).TextAlign = HorizontalAlignment.Right 'Cel(n).Text = "Cel" & i & j & k 'affiche les coordonnées des cellules Next Next Next
Me.controls("cel" & i.tostring).text
ex : Cel001, Cel002 à Cel100
Me.controls("Cel" & i.tostring("000")).text
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionJuste une remarque : La police 'Calibri' n'existe pas sur ma machine. Ceci risque de poser problème si tu distribues ton appli. Essaye d'utiliser une police standard.
Peut on la mettre en ressource
Peut on la mettre en ressource ?