Datasort JPEGs

Gridhead

New Member
Joined
Aug 30, 2006
Messages
9
I have a jpeg on top of the words "picture a" in Tab #1 of a workbook. I would like this jpeg and "picture a" to be connected so that I can copy them in tandem via a cell formula to other tabs within the workbook. How can I do this?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Hi there

I can think of no way to link cell text to a jpeg and call it via a formula.
You might however like to try something like this:

Right click each sheet tab in turn, left click View Code to open the VB Editor and paste this in the large code window:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\DEREK\My Documents\My Pictures\" & Target.Value & ".jpeg" _
).Select
Selection.Left = Target.Left
Selection.Top = Target.Top
End Sub

You will need to change this part of the above code to the pathway to your own jpegs:
C:\Documents and Settings\DEREK\My Documents\My Pictures\

Alt+F11 allows you to exit from the VB Editor. Now when you enter the name of a jpeg in a cell, if it exists, it will be inserted into the worksheet with its top left corner covering the cell.

regards
Derek
 
Upvote 0

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top