Demande de comment je peux afficher une image sous un debeugage d'un formulaire

nadiouchkado - 22 avril 2013 à 12:02
 Profil bloqué - 22 avril 2013 à 12:47
Option Compare Database

Dim Numing As String, Patch As String, Lecteur(7) As String

Private Sub Commande40_Click()
Verif_Lecteur
Image39_Click
End Sub


Private Sub Image39_Click()

Numing = Me.Numimg
Patch = Patch & ":\Images" & Numing & ".jpg"
Me.Image39.Width = 9000
Me.Image39.Height = 5000
Me.Image39.Picture = Patch
End Sub

' Il faut mettre la référence "Microsoft Scripting Runtime"
Function Verif_Lecteur() As Boolean

Dim oFSO As Scripting.FileSystemObject
Dim oDrv As Scripting.Drive
Dim p As Integer, i As Integer

Verif_Lecteur = False
'Instanciation du FSO
Set oFSO = New Scripting.FileSystemObject
i = 0
For Each oDrv In oFSO.Drives
If (oDrv.DriveLetter "Z") Or (oDrv.DriveLetter "Y") Or (oDrv.DriveLetter = "X") Or (oDrv.DriveLetter = "W") _
Or (oDrv.DriveLetter "V") Or (oDrv.DriveLetter "U") Or (oDrv.DriveLetter = "T") Or (oDrv.DriveLetter = "S") Then
Lecteur(i) = oDrv.DriveLetter
i = i + 1
End If
Next oDrv

For p = 0 To (i - 1)
Path = Lecteur(p) & ":\Bases\BaTyrV2.1.mdb"
If Exist(Path) = True Then
Verif_Lecteur = True
Patch = Lecteur(p)
Exit Function
End If
Next p
MsgBox " Pas de connexion au serveur SIM_BVH", vbOKOnly, " !!! ATTENTION !!! "

End Function

Function Exist(File)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(File)) Then
Exist = True
Else
Exist = False
End If
End Function

ca me sert a afficher une image une foie je clique sur le bouton mais moi je veux changer une foie on chosie un marco il nous affiche l'image sans cliquer pour chercher l'image svp c urgent

2 réponses

Profil bloqué
22 avril 2013 à 12:46
lis le règlement svp

La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi.

GRENIER Alain
0
Profil bloqué
22 avril 2013 à 12:47
et qui est pressé ? pas moi

La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi.

GRENIER Alain
0
Rejoignez-nous