Dim Filename as String
Filename = ActiveCell.Offset(0, -1).Value
ActiveSheet.Pictures.insert _
"C:\Documents and Settings\12ahackett\Desktop" & _
"\aspen small pics\re sized\" & Filename & ".jpg"
if the cell includes the jpg extension, then you can delete that from the
string above.
--
Regards,
Tom Ogilvy
"andy hackett " wrote in
message ...
I have a column of file names and want to write a macro to insert the
pictures the files refer to in the cell to the right my code so far is
Filename = ActiveCell.Offset(0, -1)
ActiveSheet.Pictures.insert( _
"C:\Documents and Settings\12ahackett\Desktop\aspen small
pics\re sized\(filename)"
).Select
the active cell being the insertion point, the variable "filename"
being the Jpeg filename.
Any help on the correct syntax for the insert statement would be
appreciated
---
Message posted from http://www.ExcelForum.com/