D
Dorothy Robitalle
Share work book in Excel. There are 5 tabs. 4 of the 5 tabs are handle by 4
person. 4 person enter their own workbook (They will enter the numbers). 1 of
5 tab is total the numbers from 4 tabs. I wrote a macro called savefile() and
trigger it under worksheet_change event. The purpose is to save the chnges
every 5 second if there is chagne to the sheet. However, it will not see the
chagnes right away if you are not make chnage to your own sheet. Is there a
way to refresh the workbook?
Here is the code under each worksheet_change event: Please help
Sub SaveFile()
' Author Dorothy Robitaille on 05/04/2006.
Dim PauseTime, Finish, TotalTime
Dim StartTime
Dim CurrentTime
'Set this value to 5 if you want 5 seconds between saves
PauseTime = 5 ' Set duration.
StartTime = Timer 'Set start time
Do While Timer < StartTime + PauseTime
DoEvents
Loop
CurrentTime = Timer
TotalTime = CurrentTime - StartTime
ActiveWorkbook.Save
ActiveWorkbook.RefreshAll
End sub
person. 4 person enter their own workbook (They will enter the numbers). 1 of
5 tab is total the numbers from 4 tabs. I wrote a macro called savefile() and
trigger it under worksheet_change event. The purpose is to save the chnges
every 5 second if there is chagne to the sheet. However, it will not see the
chagnes right away if you are not make chnage to your own sheet. Is there a
way to refresh the workbook?
Here is the code under each worksheet_change event: Please help
Sub SaveFile()
' Author Dorothy Robitaille on 05/04/2006.
Dim PauseTime, Finish, TotalTime
Dim StartTime
Dim CurrentTime
'Set this value to 5 if you want 5 seconds between saves
PauseTime = 5 ' Set duration.
StartTime = Timer 'Set start time
Do While Timer < StartTime + PauseTime
DoEvents
Loop
CurrentTime = Timer
TotalTime = CurrentTime - StartTime
ActiveWorkbook.Save
ActiveWorkbook.RefreshAll
End sub