Results 1 to 3 of 3

ReadyState4 equivalent for Chrome

Threaded View

  1. #1
    Registered User
    Join Date
    04-13-2004
    Posts
    28

    ReadyState4 equivalent for Chrome

    I use the below code to paste into a browser tab in Chrome, which will then open into a CSV file. This works fine when I F8 through the code, but when I run the code, the file is slow to open and the code just runs through. My question - is there a ReadyState4 equivalent for Chrome, where I can delay the code until the new CSV file opens? Any other advice/options on how to do this would be appreciated. Have attached a workbook as well.

    Sub Import_Data() 
         
         
        Application.DisplayAlerts = False 
         
         
        Dim Count, FileSaveFolder As Long 
        Dim DogName, FormDownloadURL, FileSavePath, FName As String 
         
         
        Count = 2 
        FileSaveFolder = Sheet1.Cells(2, 3) 
        FileSavePath = Sheet1.Cells(3, 3) 
        DogName = Sheet2.Cells(Count, 1) 
        FormDownloadURL = Sheet2.Cells(Count, 4) 
        FName = ThisWorkbook.Name 
         
         
        Do While DogName <> "" 
             
             
            Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -url " & FormDownloadURL) 
             
             
            Do While ActiveWindow.Caption = "FormDownloader.xlsm" 
                 
                 
            Loop 
             
             
            Closefile = ActiveWindow.Caption 
            LastRow = Cells(Rows.Count, 1).End(xlUp).Row + 1 
            Cells(1, 18).Value = "DogName" 
            Cells(2, 18).Value = DogName 
            Range(Cells(2, 18), Cells(LastRow - 1, 18)).Select 
            Selection.FillDown 
            ActiveWorkbook.SaveAs Filename:=FileSavePath & FileSaveFolder & "\" & DogName & ".csv" 
            ActiveWindow.Close 
            Windows(FName).Activate 
            Sheet2.Select 
             
             
            Count = Count + 1 
            DogName = Sheet2.Cells(Count, 1) 
            FormDownloadURL = Sheet2.Cells(Count, 4) 
             
             
        Loop 
         
         
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Chrome Extension
    By Kyle123 in forum The Water Cooler
    Replies: 81
    Last Post: 06-25-2016, 08:17 PM
  2. [SOLVED] chrome always waiting.............
    By martindwilson in forum Suggestions for Improvement
    Replies: 4
    Last Post: 09-18-2014, 12:20 AM
  3. Need to Open Web Query in Chrome
    By loveexcel2014 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2014, 12:27 PM
  4. Navigating/Downloading Chrome using VBA
    By Toadwart87 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-08-2014, 06:24 PM
  5. Copying from Chrome tab
    By patzkata in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2014, 10:14 AM
  6. Launch Chrome from within Excel on a MAC?
    By ChainsawDR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-21-2012, 01:48 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