Nov 18 2021 07:28 PM - edited Nov 18 2021 07:35 PM
Hey guys, anyone knows how to set auto refresh for the stock data in excel? I have tried using visual basic application with the coding below.
Sub Main()
ActiveWorkbook.RefreshAll
Call Refresh_Macro
End Sub
Private Sub Refresh_Macro()
Application.OnTime Now + TimeSerial(0, 0, 1), "Main"
End Sub
However, it does not work (You may refer to the below attached screenshot). I am not sure whether any error with the coding. Or anyone else know other alternative?
Thank you.
Nov 18 2021 11:10 PM
@Jesling Can't say much about the code, but the message you get suggest that you have not enable macros on your Mac. What setting do you use for Macro Security? If the first one, you will never get the chance to enable macros.
Nov 21 2021 05:39 AM
Nov 21 2021 09:58 AM
@Jesling Top left of the screen, Excel, Preferences..., Security (bottom row, third icon).
Nov 24 2021 11:36 PM
Dec 02 2021 01:36 AM