Insert Object Macro 2003 v 2007

Hibbster

Board Regular
Joined
Feb 1, 2006
Messages
95
I have a macro which is assigned to a dropdown box.
It deletes the current photo and inserts a new one based on their selection in the dropdown.
All the photos are different shapes and sizes but they all need to load into a certain place in the sheet.
The macro works like a dream in 2003 but in 2007 the photo appears as a big grey object in the middle of the sheet, blocking other data.
Obviously a compatability issue.

Anybody have any ideas? Here is the code:

ActiveSheet.Pictures.Delete
ActiveSheet.Pictures.Insert("c:\asset images\" & Range("B4").Value & "1.jpg").Select
With ActiveSheet.Shapes(ActiveSheet.Shapes.Count)
.LockAspectRatio = False
.Top = Range("l4").Top
.Left = Range("l4").Left
.Height = Range("l13").RowHeight
.Width = Range("p1").Width
End With
Selection.ShapeRange.ScaleWidth 6#, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 18, msoFalse, msoScaleFromTopLeft
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Have you installed all the service packs and hotfixes for Excel 2007?
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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