Insert a picture into named excel worksheets by client id vba

DIMWIT

Board Regular
Joined
Jul 13, 2006
Messages
52
Hi everyone,

I have a workbook containing multiple sheets. The first sheet contains a unique 4 digit id to identify the client. Other sheets within the workbook are named after a year group so Y1, Y2, Y3 and so on....

Elsewhere on my PC, i have files that are named with the 4 client digit id and year group and these files needs to be inserted as a picture in the corresponding sheet.

For example client id workbook for 2000. In year 1 worksheet i need to insert the 2000 Y1 picture, in the year 2 worksheet i need to insert the 2000 Y2 picture and so on. Not all clients will have picture files for every year group so if there is no image/file for say year 3 , i need it to ignore and go to year 4 and so on...

Does anyone has any code to help with this? The picture will also need to be cropped and resized once inserted into the worksheet.

Thanks in advance
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi DIMWIT,
I don't have that code a.t.m., but if you could post e.g. a recorded macro it's easier for people to help you.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,017
Members
448,937
Latest member
BeerMan23

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