Forum

Auto Refresh Less t...
 
Notifications
Clear all

Auto Refresh Less than One Minute/Sheet Activation

2 Posts
2 Users
0 Reactions
196 Views
(@novusexcel)
Posts: 67
Estimable Member
Topic starter
 

Could someone help me out with VBA code to automatically refresh a query (named "Times") every 30 seconds?  I can set it it for one minute but would like the refresh to occur automatically every 30 seconds instead.  

 

On a similar note, I would also like to refresh a query (named "Dates") on a different sheet upon sheet activation.  Again, I cannot figure out the VBA code.

 
Posted : 16/03/2022 9:40 am
(@catalinb)
Posts: 1937
Member Admin
 

Use Now() + TimeSerial(0,0,30) to add 30 seconds to the current time.

For a different sheet query, use:

ThisWorkbook.Worksheets("AnotherSheetName").ListObjects("Dates").QueryTable.Refresh BackgroundQuery:=False

 
Posted : 18/03/2022 2:33 am
Share: