Probleme de programation en langage VBA
Résolu
juju06340
-
juju06340 Messages postés 1 Date d'inscription Statut Membre Dernière intervention -
juju06340 Messages postés 1 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
Je débute dans la programmation et je dois faire apparaitre une image sous deux conditions
je sais le faire avec une condition mais je na'arrive pas avec deux conditions
merci de votre aide
Je débute dans la programmation et je dois faire apparaitre une image sous deux conditions
je sais le faire avec une condition mais je na'arrive pas avec deux conditions
merci de votre aide
A voir également:
- Probleme de programation en langage VBA
- Langage ascii - Guide
- Langage binaire - Guide
- Pascal langage - Télécharger - Édition & Programmation
- Excel compter cellule couleur sans vba - Guide
- Dépassement de capacité vba ✓ - Forum Excel
4 réponses
merci te ton aide mais entre temps j'ai régler mon problème mais j'ai un nouveau problème car une fois le programme lancé l'image ne s'adapte pas au cadre image dans mon userform
voici code
Private Sub CommandButton1_Click()
Label2 = Time
Label3 = Range("C9").Value & " °C"
Label4 = Range("B9").Value & "HPa"
Label5 = Range("E9").Value & " % "
If Range("C9").Value < 15 Then
Image1.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thermometre froid.jpg")
Else
Image1.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thermometre chaud.jpg")
End If
If Range("B9").Value < 1001 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thunderstorm.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value < 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\cloudy.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value > 70 And Range("C9") > 2 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\rain.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value > 70 And Range("C9") < 2 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\snow.bmp")
End If
If Range("B9").Value > 1014 And Range("E9").Value > 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\partly_cloudy.bmp")
End If
If Range("B9").Value > 1014 And Range("E9").Value < 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\sunny.bmp")
End If
End Sub
voici code
Private Sub CommandButton1_Click()
Label2 = Time
Label3 = Range("C9").Value & " °C"
Label4 = Range("B9").Value & "HPa"
Label5 = Range("E9").Value & " % "
If Range("C9").Value < 15 Then
Image1.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thermometre froid.jpg")
Else
Image1.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thermometre chaud.jpg")
End If
If Range("B9").Value < 1001 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\thunderstorm.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value < 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\cloudy.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value > 70 And Range("C9") > 2 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\rain.bmp")
End If
If Range("B9").Value > 1000 And Range("B9").Value < 1015 And Range("E9").Value > 70 And Range("C9") < 2 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\snow.bmp")
End If
If Range("B9").Value > 1014 And Range("E9").Value > 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\partly_cloudy.bmp")
End If
If Range("B9").Value > 1014 And Range("E9").Value < 70 Then
Image2.Picture = LoadPicture("C:\Users\utilisateur\Pictures\station meteo\station météo\sunny.bmp")
End If
End Sub