WEB Query + IMAGES

R

rob_smith01

Hi

Iam new to the forum. This is a tricky one, Iam coding in VB and using
Excel. Part of the project needs to get a map from multimap and return
it to a worksheet. I have written some code that uses a web query to
obtain a link to the exact postcode location within multi map where the
map image is usually shown...thisworks and is tried and tested.
Similarly my code also works for insrtig an image into an excel
worksheet. However the map image filename from multimap wont insert
into the worksheet. I have a feeling I will need an array of some sort
to read all image data in from the web page so that I can get the map
image name, so that I can return it to the worksheet....code is below.
If anyone has any ideas different or on the right track could they help
me....I have programmer block after spending many hours thinking and
trying.


Sub getmap()

Dim curcell
Dim postcode
Dim link As String
Dim file_name As String
Dim to_copy As String
Dim ie As Object
'
' getmap Macro
' Macro recorded 19/07/2005 by RS

' Get post code
Set curcell = Worksheets("sheet2").Cells(49, 5) 'set current cell in
sheet to postcode field
postcode = InputBox("Please Insert Site location post code") ' insert
new post code to sheet
curcell.Value = postcode 'puts inputed value into cell in worksheet for
the new postcode entered
webrefresh ' call to function to refresh web query in sheet

'get image
link = Application.Sheets("Sheet7").Cells(81, 1) 'link set to web query
results link

msgbox link 'output link in txt box to check

Application.ActiveSheet.Pictures.Insert(link).Select ' goto web query
link, insert image from web
end sub
 
R

rob_smith01

By the way if anyone knows on a different way I could tackle this fee
free to mention...............
 

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