ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   recherche et affichage d'une image (https://www.excelbanter.com/excel-programming/280954-recherche-et-affichage-dune-image.html)

Pierre Pruvost

recherche et affichage d'une image
 
Bonjour,

Je voudrais pouvoir chercher une image sur mon disque et l'afficher dans un
UserForm.
J'ai essayé :

Fichier = Application.GetOpenFilename("Text Files (*.jpg), *.jpg")
Image1.Picture = LoadPicture(Fichier)

Mais ça marche pas.
Qui peut m'aider

Merci
Pierre



Pierre Pruvost

recherche et affichage d'une image
 
Salut,
Merci beaucoup en effet j'avais mis Text Files à la place de Image File

merci
"Joe 90" (remove silly spam) a écrit dans le
message de news: ...
Pierre

essayez comme ca

Fichier = Application.GetOpenFilename("Image Files (*.jpg), *.jpg")
Image1.Picture = LoadPicture(Fichier)

ca marche pour moi :)

On doit appliquer un "Image Control" sur le Userform qui s'appelle

"Image1"
automatique par l'application - excel

In English (lol)

Change the word "Text" to "Image" in "Text Files". Also make sure you have
an image control on your form, If it is the first image control it will
automatically be named Image1 by Excel.

I hope this fixes your problem

Joe90

"Pierre Pruvost" wrote in message
...
Bonjour,

Je voudrais pouvoir chercher une image sur mon disque et l'afficher dans

un
UserForm.
J'ai essayé :

Fichier = Application.GetOpenFilename("Text Files (*.jpg), *.jpg")
Image1.Picture = LoadPicture(Fichier)

Mais ça marche pas.
Qui peut m'aider

Merci
Pierre






All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com