Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
A quick question for you VBA gurus Say I have a program that goes through a loop and downloads web site into an excel spread sheet, once the contents (news releases) ar there, I read off the time stamps and the headlines. I used to have this done in two stages where I first ran a shell scrip job to download the sites and save them locally in separate files - then had a VBA routine run through them to get the info. I'm now trying to do both steps within the same program and the proble comes up when the page is still loading and the code runs further - i already tries to read but there's still nothing there. Is there any way I can get it to wait till the external data i loaded? Here's a snippet of the code: 'within the outside loop not seen here, I go through the tickers an the dates and specify the URL to go to as a function of this inf ("CompleteAddress" variable below) Wit ActiveWorkbook.Worksheets("WebSiteContents").Query Tables.Add(Connection:="URL; & CompleteAddress Destination:=ActiveWorkbook.Worksheets("WebSiteCon tents").Range("A1")) .WebFormatting = xlNone .RefreshPeriod = 0 .RefreshStyle = xlOverwriteCells .Refresh End With 'now I run through the website, take time stamps and headlines an output them along with the ticker/date ActiveWorkbook.Worksheets("Output").Cells(i, 1).Value = Ticker ActiveWorkbook.Worksheets("Output").Cells(i, 2).Value = Day & "/" Month & "/" & Year ' The headline stamps start in row 23 column k and go ' down in steps of 2. The headlines are in column n ' and respective rows For j = 23 To (MaxReleases * 2 - 1) + 23 Step 2 TimeStamp = ActiveWorkbook.Worksheets("WebSiteContents").Range ("k" j).Value Headline = ActiveWorkbook.Worksheets("WebSiteContents").Range ("n" j).Value ActiveWorkbook.Worksheets("Output").Cells(i, j - 20).Value = TimeStamp ActiveWorkbook.Worksheets("Output").Cells(i, j - 19).Value = Headline Next -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PAUSE EXCEL MACRO FOR INPUT OF DATA VARIABLE | Excel Discussion (Misc queries) | |||
Macro Pause during Dialog Box data entry | Excel Discussion (Misc queries) | |||
Pause Macro to enter data in cell | Excel Programming | |||
Pause Macro to enter data in cell | Excel Programming | |||
Programing a macro to pause while running for data entry | Excel Programming |