+ Reply to Thread
Results 1 to 4 of 4

WEB Query + IMAGES

  1. #1
    Registered User
    Join Date
    07-26-2005
    Posts
    3

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

  2. #2
    Registered User
    Join Date
    07-26-2005
    Posts
    3

    Thumbs up

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

  3. #3
    Tim Williams
    Guest

    Re: WEB Query + IMAGES

    You could modify something like this

    http://groups-beta.google.com/group/microsoft.public.excel.programming/tree/browse_frm/thread/bcb30e1caefffa78/cd7991c1965532f8?rnum=1&hl=en&q=images+(excel)+author:tim+author:williams&_done=%2Fgroup%2Fmicrosoft.public.excel.programming%2Fbrowse_frm%2Fthread%2Fbcb30e1caefffa78%2F58a49fffd094fe65%3Flnk%3Dst%26q%3Dimages+(excel)+author:tim+author:williams%26rnum%3D2%26hl%3Den%26#doc_58a49fffd094fe65

    Tim.

    --
    Tim Williams
    Palo Alto, CA


    "rob_smith01" <[email protected]> wrote
    in message news:[email protected]...
    >
    > 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
    >




  4. #4
    Registered User
    Join Date
    07-26-2005
    Posts
    3
    Thanks Tim will have a look

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1