View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
yshridhar yshridhar is offline
external usenet poster
 
Posts: 229
Default displaying pictures

Let me first extend my sincere thanks to Mr. McGimpsey, for floating the idea
and to Mr. Ron for the required macro. Mr. Ron it is the same what i want.
It worked well. I changed the code, though i don't know nothing about VB
code, to fit to my requirements. The following is the change, i request your
permission for it.

Set oNewPic = shtWS.Shapes.AddPicture( _
Filename:=strFileLoc, _
LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, _
Left:=.Left + 1, Top:=.Top, Width:=.Width, Height:=.Height)

'Maintain original aspect ratio and set to full size
oNewPic.LockAspectRatio = msoFalse
oNewPic.ScaleHeight Factor:=1, RelativeToOriginalSize:=msoFalse
oNewPic.ScaleWidth Factor:=1, RelativeToOriginalSize:=msoFalse

If blnFitInDestHeight = True Then
'Resize the picture to fit in the destination cells
oNewPic.Height = 78
oNewPic.Width = 103
End If
any suggestions for the change.
The code is more advantegious than the "lookuppictures" (i hope i am not
hurting Mr. McGimpsey) as we can store the picture-path with the database
without bulging the size of the file.

Mr. Ron one more question : i am inserting the path using insert|hyperlink
and removing it. Is it the correct way or can you suggest any simple way.

Heart felt Thanks to Mr. McGimpsey and Mr. Ron
with regards
Sridhar

"Ron Coderre" wrote:

Download the demo at this link:
http://www.contextures.com/excelfiles.html#CH0003

The ShowFilePicsDemo shows how to click on a drop-down list and pull the
associated picture from network or web folders.

Is that something you can work with?
***********
Regards,
Ron

XL2003, WinXP


"yshridhar" wrote:

I am sorry to post the query once again. I main school data base in excel.
The database has around 1000 student entries. It contians student id,
student particulars, fee structure and etc. What i want is i would like to
incorporate the photos of the students and when i select the student id, i
would like to get the std-data with his/her photo. I tried McGimpsey
"lookuppictures". It is allowing me only about 75 pictures. How can i store
the photos of all the 1000 students? Is there any way in Excel?
with heart felt thanks to all from Sridhar
Sridhar