Results 1 to 1 of 1

Copy CSV file from URL(HTTPS) and paste in existing workbook should prompt for creds

Threaded View

  1. #1
    Registered User
    Join Date
    10-23-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    1

    Copy CSV file from URL(HTTPS) and paste in existing workbook should prompt for creds

    Hi This is what i am trying to do.

    I need to copy a csv file from URL (HTTPS) and paste in a existing workbook. I wrote below macro which is functioning properly being in the network. If someone execute same macro from outside the network it is not working.

    I want to change below macro to prompt for credentials for username and password so that it could authenticate. Any help would be appreciated.

    Sub transfercsv()
    sCSVLink = "xxxxxxxxx"
    ssheet = "CSV Transfer"
    
    Set wnd = ActiveWindow
    Application.ScreenUpdating = False
    Sheets(ssheet).Cells.ClearContents
    Workbooks.Open Filename:=sCSVLink
    Windows("Download").Activate
        Cells.Select
        Selection.Copy
        Windows("Applications.xlsm").Activate
        Sheets("CSV Transfer").Activate
        Range("A1").Select
        ActiveSheet.Paste
        Application.CutCopyMode = False
           
        Application.DisplayAlerts = False
        Windows("Download").Activate
        ActiveWindow.Close
        Application.DisplayAlerts = True
        Sheets("Main Page").Activate
        
    End Sub
    Last edited by Leith Ross; 10-30-2015 at 04:27 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy range to existing workbook and paste with an offset
    By windowshopr in forum Excel General
    Replies: 1
    Last Post: 04-16-2014, 11:39 AM
  2. Copy paste worksheet range to existing workbook
    By bhoon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-27-2014, 02:03 PM
  3. [SOLVED] Copy Contents of a text file and paste it in command prompt
    By szpt9m in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-10-2014, 05:56 AM
  4. Download Excel Workbook from IE copy and paste into existing Workbook
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-16-2013, 03:13 PM
  5. macro to open, copy paste from existing excel file to a new blank file
    By 2blessed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 06:05 PM
  6. Replies: 1
    Last Post: 10-17-2005, 04:05 AM

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