#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro to display

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Macro to display

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

On Sun, 16 May 2010 03:19:01 -0700, puiuluipui
wrote:

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!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro to display

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

On Sun, 16 May 2010 03:19:01 -0700, puiuluipui
wrote:

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!


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to display a picture JB Bates[_2_] Excel Discussion (Misc queries) 1 November 3rd 09 06:33 PM
Display a message when a macro is executing alexrs2k Excel Discussion (Misc queries) 2 September 11th 09 05:20 PM
Display Macro Recording Tool Bar claude jerry Excel Discussion (Misc queries) 1 April 26th 08 10:01 AM
Display result of operation in macro orquidea Excel Discussion (Misc queries) 2 December 26th 07 04:09 AM
Display a formula as a value using a macro MarcusA Excel Discussion (Misc queries) 0 February 17th 06 12:13 AM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"