Shapes disappear from Excel 2000 to 2003?

C

Cheer

I use the following routine to put selected images from the web on a
spreadsheet:

Public Sub Get_Image(wsSheet As Object, strURL As String)
Dim shape As shape

Set shChart = wsSheet.Shapes.AddPicture(strURL, False, True, 200,
100, 600, 400)

For Each shape In wsSheet.Shapes
shape.Placement = xlFreeFloating
shape.Visible = msoTrue
Next

shChart.ScaleWidth 1#, msoTrue, msoScaleFromTopLeft
shChart.ScaleHeight 1#, msoTrue, msoScaleFromTopLeft

Set shChart = Nothing
End Sub

When I call this routine in Excel 2000 (v. 9), no problem, each shape
appears as it should on sheet wsSheet. However, when I run the same
thing in Excel 2003 (v. 11), the shapes are there because I can click
on them and see the selection boxes, but they are not visible on the
page. I added the "shape.visible" line above thinking that would help,
but no joy.

I believe I can right-click the image in Excel 11 and select "Reset"
and then the picture appears. However, "reset" does not seem to be a
method for shapes in Office 2000 (where the development is taking
place).

Any thoughts on how I can get these images to show up programmatically
would be greatly appreciated.
 

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