Excel 2003 Macro & VBA for importing picture from Website

Joined
Feb 10, 2011
Messages
1
Reaction score
0
Hello All,

I have created a script to import picture from the website with the URL at cell Sheet1 B3 as below. Kindly anyone help me on how can I clear/delete the past picture when I run the macro on the subsequent run. I would also like to refreshes the picture whenever I open up the excel file. Your help will be very much appreciated.

Sub GetPicture()

Dim URL As String

PictureURL = Worksheets("Sheet1").Range("B3").Value

With ActiveSheet.Range("B4:F27")
Set MyPict = ActiveSheet.Pictures.Insert(PictureURL)
MyPict.Top = .Top
MyPict.Left = .Left
MyPict.Width = .Width
MyPict.Height = .Height
MyPict.Placement = xlMoveAndSize

End With

End Sub
 

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