Macro to display

P

puiuluipui

Hi, i need to write in A1 a number and a macro to search in a folder for a
picture with this name and then to display this picture.
If i write 22942 and run the macro, then the macro to search in a folder and
to find and display in curent sheet, the picture 22942.
Can this be done?
Thanks!
 
G

Gord Dibben

Sub Insert_Pic()
ActiveSheet.Pictures.Insert ( _
"C:\Documents and Settings\username\My Documents\My Pictures\" & _
Range("A1") & ".jpg")
End Sub

Adjust path and filetype to suit


Gord Dibben MS Excel MVP
 
P

puiuluipui

Thanks!

"Gord Dibben" a scris:
Sub Insert_Pic()
ActiveSheet.Pictures.Insert ( _
"C:\Documents and Settings\username\My Documents\My Pictures\" & _
Range("A1") & ".jpg")
End Sub

Adjust path and filetype to suit


Gord Dibben MS Excel MVP



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top