Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel and Picture

Hi,

I want to have the option to get a picture on my excel
sheet.

I want to put the data , let say in Ceel A1
(exampel: YR255) and excel will go and find the file
(YR255.jpg) and will display it on A2

How do i do it , please help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Excel and Picture

Hi Yaron,

Here's one way to do it:

Sub InsertPicture()
Dim objPict As Picture
Dim szName As String
szName = Sheet1.Range("A1").Value
Set objPict = Sheet1.Pictures.Insert("E:\" & szName)
objPict.Top = Sheet1.Range("A2").Top
objPict.Left = Sheet1.Range("A2").Left
End Sub

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Yaron" wrote in message
...
Hi,

I want to have the option to get a picture on my excel
sheet.

I want to put the data , let say in Ceel A1
(exampel: YR255) and excel will go and find the file
(YR255.jpg) and will display it on A2

How do i do it , please help



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
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
How do I put single picture into Picture it from a disk? I need help with pictures! New Users to Excel 1 December 2nd 06 05:17 PM
How to extract a picture from an Excel worksheet into a picture fi SARANJAI Excel Discussion (Misc queries) 10 June 12th 05 05:00 AM


All times are GMT +1. The time now is 02:24 AM.

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"