Excel: Recalculating every x seconds

前端 未结 2 1553
一向
一向 2020-12-17 03:20

One of my spreadsheets deals with various calculations involving, among other things, the current date and time and it would be nice to have it automatically refresh itself

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-17 03:44

    Goto Developer Visual basic Editor - Right Click workbook - insert module (make sure you have manual calculation

    in the module

    Sub run_over
    Timetorun = Now + timevalue("00:00:10")
    application.ontime timetorun,"Refresh_all"
    End Sub
    
    Sub Refresh_all
    Activeworkbook.Refreshall
    End Sub
    
    Sub auto_close()
    Application.OnTime timetorun, Refresh_all, , False
    End Sub
    

    Change the timing in "00:00:00" format as required

提交回复
热议问题