Viewing a response to: @susueng/re-konstantint-cryptocurrency-accounting-in-excel-20170830t030113634z
Of course you can also add logic to recalculate the sheet automatically at regular intervals. One way to do this could be to add a new module with, for example, the following code: ``` Private Running As Boolean Public Sub StartTimer() Running = True Call TimerEvent End Sub Public Sub StopTimer() Running = False End Sub Public Sub TimerEvent() Workbooks("Book1").Worksheets(1).Calculate If Running Then Application.OnTime Now + TimeValue("00:00:10"), "TimerEvent" End If End Sub ``` (Note that you'd need to replace "Book1" with the appropriate name, or simply use `ActiveWorkbook` in place of `Workbooks("Book1")`, although then the timer will be recalculating whatever workbook you have open at the moment). You can start the timer by running the `StartTimer` macro (using the "Run" button) and stop it using `StopTimer`. It might make sense to also add something like this to the code of `ThisWorkbook` module, so that the timer will start and stop automatically: ``` Private Sub Workbook_Open() Call StartTimer End Sub Private Sub Workbook_BeforeClose(Cancel As Boolean) Call StopTimer End Sub ```
post_id | 11,458,144 |
---|---|
author | konstantint |
permlink | re-susueng-re-konstantint-cryptocurrency-accounting-in-excel-20170830t083538814z |
category | howto |
json_metadata | "{"app": "steemit/0.1", "tags": ["howto"]}" |
created | 2017-08-30 08:35:42 |
last_update | 2017-08-30 08:37:36 |
depth | 2 |
children | 0 |
net_rshares | 0 |
last_payout | 2017-09-06 08:35:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 SBD |
curator_payout_value | 0.000 SBD |
pending_payout_value | 0.000 SBD |
promoted | 0.000 SBD |
body_length | 1,150 |
author_reputation | 360,301,994,866 |
root_title | "Cryptocurrency Accounting in Excel" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 SBD |
percent_steem_dollars | 10,000 |