Re: Assign Todays Day To Sql
Hi Mate,
Sorry for delay been really busy (must remember to post reply on another subject i raised :confused: )
Im sorry but i didnt myself 100% clear. I made the spreadsheet by using data/import external data/import.
Form here the vba kicks in by using
Sub Refresh_Me()
' Written 18/04/2007 by Lee
' Refresh info every two minutes for duration of business day.
Application.ScreenUpdating = False
Sheets("All CS").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("SJ Centre").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("PM").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("OV").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("All Mortgage Sales").Select
Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("All Centre").Select
Range("I22").Value = "=NOW()"
Sheets("Totals").Select
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
'email
Application.ScreenUpdating = True
ActiveWorkbook.Save
Range("IV1").Value = "120"
Range("A1").Select
Call Timer
End Sub
Display More
this is done over 2 workbooks merged into 1, the "Call Timer" section calls
Dim CountDown As Date
Sub Timer()
Application.StatusBar = "Refreshing Data In " & Range("IV1") & " Seconds"
CountDown = Now + TimeValue("00:00:01")
Application.OnTime CountDown, "Reset"
End Sub
Sub Reset()
Dim count As Range
Set count = [IV1] ' IV1 contains the number of seconds for the countdown.
count.Value = count.Value - 1
If count = 0 Then
Refresh_Me
Exit Sub
End If
Call Timer
End Sub
Display More
in order to have the sheets refresh after two mins. but like i said in my original post i have to come in and refresh twelve sheets. so using your method where would i incorporate this? sorry for confusion.
Thanks Muchly
Lee