Re : classeur compatible 2003 & 2000
=) Merci de m'aider!! Ce qui m'intrigue c'est le fait que cela marche parfaitement bien sous excel 2007
Je pense que le code qui doit clocher dans le fichier doit être celui la:
Dim Photo
Private Sub CommandButton1_Click()
Unload ajouter
modification.Show
End Sub
Private Sub CommandButton3_Click()
Photo = Application.GetOpenFilename("Fichiers gif ou jpg,*.gif;*.jpg")
If Photo = False Then Exit Sub
Imgphoto.Picture = LoadPicture(Photo)
Imgphoto.Visible = True
CommandButton3.Visible = True
End Sub
Private Sub UserForm_initialize()
ComboBox1.RowSource = "BD!A2:A20"
ComboBox2.RowSource = "BD!C2:C10"
End Sub
Private Sub CommandButton2_Click()
Dim derlig As String
'**************** VALIDATION DES DONNEES SAISIES **************
If TextBox1.Value = "" Then
MsgBox ("Quelle est la référence de votre portillon?.")
Exit Sub
End If
If TextBox2.Value = "" Then
MsgBox ("Quel est le niveau du portillon?.")
Exit Sub
End If
If TextBox3.Value = "" Then
MsgBox ("Quelle est la localisation de votre portillon.")
Exit Sub
End If
If ComboBox1.ListIndex = -1 Then
MsgBox ("Dans quel bâtiment se trouve le portillon ?")
Exit Sub
End If
If ComboBox2.ListIndex = -1 Then
MsgBox ("Quel est l'état du portillon?")
Exit Sub
End If
'******************* FIN VALIDATION *******************
num = Range("portillons!A" & Rows.Count).End(xlUp).Row + 1
Cells(num, 1) = ComboBox1
Cells(num, 2) = TextBox2
Cells(num, 3) = TextBox3
Cells(num, 4) = TextBox1
Cells(num, 5) = ComboBox2
Cells(num, 6) = Photo
Unload ajouter
finajout.Show
End Sub
A ton avis le code est bon?