|
| HOMEPAGE | INDICE FORUM | REGOLAMENTO | ::. | NEI PREFERITI | .:: | RSS Forum | RSS News | NEWS web | NEWS software | |
| PUBBLICITA' | | | ARTICOLI | WIN XP | VISTA | WIN 7 | REGISTRI | SOFTWARE | MANUALI | RECENSIONI | LINUX | HUMOR | HARDWARE | DOWNLOAD | | | CERCA nel FORUM » | |
21-10-2006, 09.02.34 | #1 |
Senior Member
Registrato: 08-01-2003
Messaggi: 201
|
aggiornare il foglio excel ogni secondo
|
21-10-2006, 12.13.06 | #2 |
Gold Member
WT Expert
Registrato: 09-01-2002
Loc.: None of your business
Messaggi: 5.505
|
Devi necessarimente fare uso di macro ed API se vuoi un codice elegante come questo:
1 - Prima di tutto inserisci un modulo ed all'interno immetti queste poche righe: -------------------------------------------- Private Declare Function SetTimer Lib "user32" _ (ByVal hwnd As Long, _ ByVal nIDEvent As Long, _ ByVal uElapse As Long, _ ByVal lpTimerFunc As Long) As Long Private Declare Function KillTimer Lib "user32" _ (ByVal hwnd As Long, _ ByVal nIDEvent As Long) As Long Public Sub VBA_TimerProc(ByVal hwnd As Long, ByVal uint1 As Long, _ ByVal nEventId As Long, ByVal dwParam As Long) 'Immetti qui dentro il codice VBA che ti serve eseguire ogni lTimer millisecondi End Sub Public Sub AvviaTimer(ByVal lTimer As Long) 'lTimer è espresso in millisecondi SetTimer ThisWorkbook.Application.hwnd, 1, lTimer, AddressOf VBA_TimerProc End Sub Public Sub InterrompiTimer() KillTimer ThisWorkbook.Application.hwnd, 1 End Sub --------------------------------------------- All' interno della Sub VBA_TimerProc scrivi il codice che vuoi eseguire, come da commento 2 - Adesso vai in ThisWorkBook ed inserisci queste altre poche righe --------------------------------------------- Private Sub Workbook_Deactivate() InterrompiTimer End Sub Private Sub Workbook_Open() AvviaTimer 5000 End Sub --------------------------------------------- Come esempio ho impostato un timer pari a 5 secondi in Workbook_Open |
Utenti attualmente attivi che stanno leggendo questa discussione: 1 (0 utenti e 1 ospiti) | |
Strumenti discussione | |
|
|
Discussioni simili | ||||
Discussione | Autore discussione | Forum | Risposte | Ultimo messaggio |
Hacker attacca sito antipedofilia | Sbavi | Archivio News Web | 34 | 15-02-2008 00.08.23 |
[EXCEL] Ultima riga occupata excel | Fast-M | Programmazione | 0 | 17-12-2005 01.17.55 |
[VB6] Far apparire 7 label diverse ogni secondo | Longhorn | Programmazione | 7 | 12-09-2005 17.39.03 |
Vb6 e Excel 2003 ...come fare? | Captain-Hook | Programmazione | 1 | 26-06-2005 03.29.37 |
Ancoa VBA in Excel, creare Macro estrazione dati da un foglio | Gabry | Programmazione | 6 | 16-05-2004 15.19.03 |