a timer loop in excel ?

udikafri

New member
a timer loop in excel ?

Hi I need to make a function run every 20 minuts from the open_worksheet routin. I'm using Office 2003 pro all of the following needed to be activated every 20 minuts(starts when workbook is opened) code: the last row : updateAccess is a function that writes the data to a db. and the excel is open all time. was trying to create a timer trigger loop somthing like while(true) < do <sleep(20 minuts) but I couldn't even get a timer option any ideas anyone ?? p.s. I'm using Office 2003 pro thanks udi
Private Sub Workbook_Open() Cells.Select Selection.ClearContents With ActiveSheet.QueryTables.Add(Connection:= _ "URL;http://www.bizportal.co.il/shukhahon/sh_maof.shtml", Destination:=Range( _ "A1")) .Name = "sh_maof.shtml" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .BackgroundQuery = True .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .WebSelectionType = xlSpecifiedTables .WebFormatting = xlWebFormattingNone .WebTables = "15" .WebPreFormattedTextToColumns = True .WebConsecutiveDelimitersAsOne = True .WebSingleBlockTextImport = False .WebDisableDateRecognition = False .WebDisableRedirections = False .Refresh BackgroundQuery:=False End With ActiveWorkbook.Save updateAccess End Sub​
 
למעלה