Results 1 to 11 of 11

Downloading multiple files from Internet

Threaded View

  1. #6
    abhay_547
    Guest

    Re: Downloading multiple files from Internet

    Hi Ross,

    Thanks a lot for your reply, I had incorporated the code provided by you in your earlier post in my download tool macro but it is showing an compile error. Attached is my download tool macro file for your reference.

    Apart from this I have identified one more issue in my macro .i.e. when I try to remove a URL from the listbox by selecting the same and clicking on remove button it gets only removed from the listbox but not from the excel sheet. It should ideally remove the selected listbox item from excel sheet as well and should ask first before removing the item from the listbox .i.e. a confirmation from user with a prompt .i.e. "Are you sure you want to remove this item".

    I have got the below code from the extensive google search for deleting items from listbox (which will also delete the items from excel sheet but some how when I am trying to incorporate the below code in my macro it doesn't work. Please help.

    Private Sub cmdDel_Click()
    
    With UserForm1.ListBox1
        'Check for selected item
        If (.Value <> vbNullString) Then
        
            'If more then one data rows
            If (.ListIndex >= 0 And xlLastRow("Sheet1") > 2) Then
                Range(.RowSource)(.ListIndex + 1, 1).EntireRow.Delete
                'Update listbox
                .RowSource = "Sheet1!A2:C" & xlLastRow("Sheet1")
                
            'If only one data row
            ElseIf (.ListIndex = 0 And xlLastRow("Sheet1") = 2) Then
                Range(.RowSource)(.ListIndex + 1, 1).EntireRow.Delete
                'Update listbox
                .RowSource = "Sheet1!A2:C2"
            End If
        Else
            MsgBox "Please Select Data"
            
        End If
    End With
    
    End Sub
    Apart from this I want to rename the downloaded files as per the names present against each link in the column B.


    Thanks a lot for your help in advance.
    Attached Files Attached Files
    Last edited by abhay_547; 10-03-2010 at 07:54 AM.

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