PtitJeoJeo
Messages postés85Date d'inscriptionmardi 29 janvier 2002StatutMembreDernière intervention18 avril 2005
-
5 févr. 2002 à 20:27
ZTPdiffusion
Messages postés46Date d'inscriptionlundi 16 avril 2001StatutMembreDernière intervention 7 mars 2002
-
5 févr. 2002 à 21:05
Voila tout d'abord merci de m'accorder un peu de ton temps !!!
Bon alors mon problème c que en mode execution, visual basic ne reconné pas les trucs comme "commondialog1.filter" ou "commondialogue1.filename"
c bizar quoi !!!!!
compren pô !!
merci de m'aider parce que la je vais exploser mon ordi !!!!
ZTPdiffusion
Messages postés46Date d'inscriptionlundi 16 avril 2001StatutMembreDernière intervention 7 mars 2002 5 févr. 2002 à 21:05
Salut
Mets un CommonDialog (CommonDialog1), un bouton (Command1) et un TextBox (Text1) sur ta feuille et essayes ce petit bout de code
Private Sub Command1_Click()
On Error GoTo Error
With CommonDialog1
.DialogTitle = "Insérer une image"
.Filter = "Tous les fichiers(*.*)|*.*|Fichiers BMP(*.bmp)|*.bmp|Fichiers JPEG(*.jpg;*.jpeg)|*.jpg;*.jpeg|Fichiers GIF(*.gif)|*.gif|Fichiers TIF(*.tif)|*.tif"
.FilterIndex = 3
.ShowOpen
End With
If CommonDialog1.FileName <> "" Then
text1.text = CommonDialog1.FileName
Else
text1.SetFocus
End If
Error:
End Sub