Probleme de programation en langage VBA

Résolu
juju06340 -  
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
A voir également:

4 réponses

moiced59 Messages postés 1145 Date d'inscription   Statut Membre Dernière intervention   60
 
re

regarde du cote de sizemode
1
moiced59 Messages postés 1145 Date d'inscription   Statut Membre Dernière intervention   60
 
bonjour

peux tu mettre ton code et la 2 eme condition au format texte a part et je regarde ca
0
juju06340
 
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
0
juju06340 Messages postés 1 Date d'inscription   Statut Membre Dernière intervention  
 
merci
0