Results 1 to 8 of 8

Stuck in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    12-21-2016
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    7

    Question Stuck in VBA

    Hi everyone,

    I'm stuck in VBA. I'm probably missing a simple part but I can't figure it out.
    I've made a userform that collects information out of a database. Now the difficult part: When the name changes, it should download the corresponding picture (link in Cell offset 37). Sometimes it can't download that files, in that case it should show a "no picture available" picture (link in offset 39).
    The macro works fine untill the Error part, when it can't download the picture...

    Here's the part of macro so far:

    Private Sub CboMedew_Change()
    Dim url_path As String
    Dim file_path As String

    url_path = rName.Offset(0, 37).Value
    file_path = ThisWorkbook.Path & "\" & "Image.png"
    ' Download picture
    DownloadFilefromWeb url_path, file_path
    On Error Resume Next
    url_path = rName.Offset(0, 39).Value
    file_path = ThisWorkbook.Path & "\" & "Image.png"

    With Image2
    .Picture = LoadPicture(file_path)

    End With
    ' Delete Saved file
    Kill file_path

    End Sub
    Last edited by Roeldh; 12-22-2016 at 05:36 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Just Stuck
    By kempdog34 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2014, 04:58 PM
  2. Stuck at work and stuck on a count function
    By gregfetzer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2012, 12:47 AM
  3. Not sure what to do(Stuck)
    By sshanahan19 in forum Excel General
    Replies: 2
    Last Post: 03-22-2012, 01:51 PM
  4. Stuck
    By ROPI in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2010, 05:28 AM
  5. [SOLVED] Please help, I'm stuck
    By Ben in forum Excel General
    Replies: 2
    Last Post: 03-30-2006, 04:55 PM
  6. stuck
    By darkbearpooh1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-10-2006, 06:30 PM
  7. Stuck
    By PaulOakley in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-13-2005, 01:05 PM

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