Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 30 Oct 2004 21:26:22 GMT, Ron
wrote: Hello vba gurus [green with envy, but learning] I have a web query that needs refreshing periodically throughout the day. Sometimes upto 20 times. The web query URL is mostly static but has a 7 digit event number tagged on the end. i.e. http://webquery-site/market.asp?id=2211993 The url is static but the 7 digit number on the end changes every day, and also several times through the day. Ordinarily I do this manually but am going away for 2 weeks and want to automate this so a friend can set it running on a morning and let it do it's thing all day. I have in column F a list of times ie 20:28:00 and in column H I have the corresponding event id's ie 2211993, 2211994, 2211897 etc. What I'm struggling with is getting the Application.OnTime procedure to work correctly. My code at the moment is.. Sub OnTimeTest() Dim TimeCell2 As String TimeCell2 = Sheets("test").Range("F2") Application.OnTime TimeValue("TimeCell2"), "testProcedure" End Sub The variable TimeCell2 is the time that sits in cell F2. The procedure "testProcedure" simply pops up a message box for now until I get this right then I will link it to the sub that refreshes the query. I'm sure the solution is something simple but I'm at a loss now. I think I'm going wrong on the syntax somewhere. Any ideas guys? Thanks Ron Hi Ron, Try this: Replace the "TimeCell2" argument to TimeValue with Format(TimeCell2, "hh:mm:ss") Hope this helps Lars-Åke |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Driving me CRAZY~ please help | New Users to Excel | |||
Sorry for reposting - but this is driving me crazy! | Excel Discussion (Misc queries) | |||
VLOOKUP driving me crazy | Excel Discussion (Misc queries) | |||
HELP!? Passwords are driving me crazy. | Excel Worksheet Functions | |||
Driving me crazy! | Excel Programming |