Consulting

Results 1 to 2 of 2

Thread: Solved: Open CSV website?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Solved: Open CSV website?

    Welcome.

    I have strange situation?
    My code works fine years, but monday it stop works?
    [vba]
    This is fragment of code.

    For Each vIE In SWs
    If Left(vIE.LocationURL, 4) = "http" Then
    Set vIEDoc = vIE.Document
    For i = 0 To vIEDoc.links.Length - 1
    found = False
    With vIEDoc
    If Right(vIEDoc.links(i).href, 7) = "english" Then
    found = True
    todaysURL = vIEDoc.links(i).href
    If found Then
    Workbooks.Open todaysURL

    'error: Method 'Open' of object 'Workbooks' failed


    Stop
    GoTo 10
    End If
    End If
    End With
    Next i
    End If
    Next[/vba]


    I tried go to other-short way, but stuck here: how open CSV-file in website?
    [VBA]

    URL = Range("A" & i)

    Set ie = CreateObject("InternetExplorer.Application")
    With ie
    .Visible = 1
    .Navigate URL
    Do While .Busy: DoEvents: Loop
    ' DoEvents


    ' How open CSV file for copy to Excel?
    ' ActiveWorkbook.SaveAs Filename:="AEG.xls", _
    FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
    ReadOnlyRecommended:=False, CreateBackup:=False

    End With[/vba]
    Attached Files Attached Files

Posting Permissions

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