ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   WEB Query + IMAGES (https://www.excelbanter.com/excel-programming/335530-web-query-images.html)

rob_smith01

WEB Query + IMAGES
 

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).Sele ct ' goto web query
link, insert image from web
end sub


--
rob_smith01
------------------------------------------------------------------------
rob_smith01's Profile: http://www.excelforum.com/member.php...o&userid=25599
View this thread: http://www.excelforum.com/showthread...hreadid=390152


rob_smith01[_2_]

WEB Query + IMAGES
 

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

--
rob_smith0
-----------------------------------------------------------------------
rob_smith01's Profile: http://www.excelforum.com/member.php...fo&userid=2559
View this thread: http://www.excelforum.com/showthread.php?threadid=39015


Tim Williams

WEB Query + IMAGES
 
You could modify something like this

http://groups-beta.google.com/group/...a49fffd094fe65

Tim.

--
Tim Williams
Palo Alto, CA


"rob_smith01" wrote
in message ...

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


--
rob_smith01
------------------------------------------------------------------------
rob_smith01's Profile:

http://www.excelforum.com/member.php...o&userid=25599
View this thread: http://www.excelforum.com/showthread...hreadid=390152




rob_smith01[_3_]

WEB Query + IMAGES
 

Thanks Tim will have a loo

--
rob_smith0
-----------------------------------------------------------------------
rob_smith01's Profile: http://www.excelforum.com/member.php...fo&userid=2559
View this thread: http://www.excelforum.com/showthread.php?threadid=39015



All times are GMT +1. The time now is 12:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com