Hi, I'm new in this forum and I need some help to solve a problem I have. I need to execute automatically a vba macro every minute. I migrate to Excel 2007 from Excel 2003. In Excel 2003 I wrote this to execute automatically the macro:
Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:01:00"), "actualizar_gas"
Application.DisplayFullScreen = True
Hoja16.Select
Hoja16.Cells(1, 1).Select
Range("A2").Select
Hoja17.Select
Hoja17.Cells(1, 1).Select
Range("A2").Select
Call buscar_ultimo
Call actualizar_gas
End Sub
Sub actualizar_gas()
'
' Actualiza el gráfico de GAS NATURAL cada 1 minuto
'
Time = Now + TimeValue("00:01:00")
Application.OnTime dTime, "actualizar_gas"
Application.ScreenUpdating = False
'
...
but in Excel 2007 is not working.
Can someone tell me what is wrong or what I have to do to solve this problem?
PD: Sorry about my english
Bookmarks