How to Disable Background Refresh in Excel (2 Handy Methods)

Download Practice Workbook


The sample dataset contains EURO Conversion rates from other currencies and the data is linked to a webpage that shows live updates of currency rates.

How to Disable Background Refresh in Excel


Method 1 – Disable Background Refresh from Query Properties

Steps:

  • Click any of the cells which contain the linked data.
  • Go to the Data tab in the top ribbon.
  • Click on the Refresh All drop-down menu and select Connection Properties.

How to Disable Background Refresh in Excel

  • A new window will appear named “Query Properties”.
  • Uncheck the option named “Enable Background Refresh”.

How to Disable Background Refresh in Excel

  • You have disabled the background refresh. The data will not refresh automatically. To refresh again, click Refresh All.

Read More: Pivot Table Not Refreshing (5 Issues & Solutions)


Similar Readings


Method 2 – Apply VBA Code to Disable Background Refresh

Steps:

  • Go to the Developer tab in the top ribbon.
  • Select Visual Basic.

Apply VBA Code to Disable Background Refresh

  • The Visual Basic window will open.
  • Go to Insert > Module to open a new module.

Apply VBA Code to Disable Background Refresh

  • Enter the following code.
Sub Disable_Background_Refresh()
Dim dbr As Long
    With ActiveWorkbook
        For dbr = 1 To .Connections.Count
          If .Connections(dbr).Type = xlConnectionTypeOLEDB Then
            .Connections(dbr).OLEDBConnection.BackgroundQuery = False
          End If
        Next dbr
    End With
End Sub

Apply VBA Code

  • Click on the Run button.
  • Select “Disable_background_refresh” macro and click on Run.

How to Disable Background Refresh in Excel

  • The background refresh has become disabled.
  • You can also make a button to disable background refresh using the macro code.
  • Go to the Insert tab and select the button option.

Apply VBA Code

  • Select an area in the worksheet where you want to place the button.
  • A window named “Assign Macro” will open.
  • Select the macro and click OK.

Apply VBA Code

  • A button will be created. Rename it as “Disable Background Refresh”.
  • The background refresh option will be unchecked.

Apply VBA Code

VBA Code Explanation:

Sub Disable_Background_Refresh()
  • Set the macro name as Disable_Background_Refresh
Dim dbr As Long
  • Setting a variable that will store numeric values of a big range.
With ActiveWorkbook
For dbr = 1 To .Connections.Count
If .Connections(dbr).Type = xlConnectionTypeOLEDB Then
.Connections(dbr).OLEDBConnection.BackgroundQuery = False

This code will go through all the connections.

  • Make it True to enable the background refresh and False to disable it.

Read More: VBA to Refresh Pivot Table in Excel (5 Examples)


Related Articles


<< Go Back to Power Query Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Osman Goni Ridwan
Osman Goni Ridwan

OSMAN GONI RIDWAN is a marine engineer who loves exploring Excel and VBA programming. Programming, to him, is a time-saving tool for efficiently managing data, files, and internet tasks. He is proficient in Rhino3D, Maxsurf, C++, MS Office, AutoCAD, Excel, and VBA and goes beyond the basics. Armed with a B.Sc in Naval Architecture & Marine Engineering from BUET, OSMAN has transitioned into the role of a content developer. Specializing in creating technical content exclusively centered around Excel... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo