how can i present a JPG in a window having cell with the path?

T

tsr1955

I build a catalog for coins collection with Excel. each row represents a coin
(record). in two cells (fields) i have a path to both sides of the coin
scanned as a JPG files in the specific directory. i would like the following
scenario: when i stand on a specific row (any cell), the relevant images are
presented in 2 big windows. when i move to another row, the image
automatically changes etc. i would like also to control the size of the
window. would appreciate your help, thanks, sam
 
H

Harald Staff

Hi Sam

See if this gets you started:

Insert an Image1 from the activex coltrols toolbox. Set its picturesizing
mode to zoom.

Worksheet code (rightclick sheet tab, "view code", paste this in:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim R As Long
R = Target(1).Row
Me.Image1.Picture = LoadPicture(Cells(R, "E").Value)
End Sub

where "E" is the column with the full picture path and name

HTH. Best wishes Harald
 

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