Add a shape from no of shapes according to cell value

mavisuruwa

New Member
Joined
Jun 15, 2015
Messages
1
Hi,

I'm a newbie, an engineer assigned to do lots of re-bar detailing. I did it manually until now and seeking help to produce an excel program. Basically, most of parameters can be programmed using excel's common commands. However I have this question. How can I add a specific shape/picture to a cell according to a value input to a cell? I have nearly 400 shapes in hand. I know that VBA scripts can do it, but don't know how. Thanks in advanced.

K
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
The following is the code I just posted a few days ago for adding a picture to the active cell, the cell one just double-clicked. You can modify it to suit your need. You need to change the path and file name, the Left and Top to the cell you want to picture to be pasted to, and Width and Height of the picture.

Code:
[COLOR=#333333]Dim p As Object[/COLOR]

Set p = ThisWorkbook.Sheets(1).Shapes.AddPicture(Filename:="D:\PICTURE DATABASE\DSC02029.JPG", LinkToFile:=False, _
SaveWithDocument:=True, Left:=ActiveCell.Left, Top:=ActiveCell.Top, Width:=153, Height:=204)
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

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