Auto Trigger Macro to Sort using VBA

Holbie

New Member
Joined
Nov 17, 2020
Messages
4
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
So I used this method posted about 6 months ago to create a triggered macro to sort a table that updates based on queried data and new calculations.

It was working fine this morning, I came back from lunch and it is now broken.

I changed nothing at all but it will not sort now when the data changes in the table. Can anyone help with this please. below is my macro trigger, The macros themself will run and perform the desired sort when triggered manually, but do not auto sort the table when the ranking changes now.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)


    If Not Intersect(Target, Range("Site_DB")) Is Nothing Then
        Macro3
    End If
    
    If Not Intersect(Target, Range("Team_DB")) Is Nothing Then
        Macro1
    End If
    
End Sub

There are two tables with dynamic data tied to a larger data table the queries a cube on our server and a few other reports that overwrite to a static location. Why will this no longer trigger the appropriate macros to run when the data in the tables chagne?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Make certain "Site_DB" and "Team_DB" still exist ...

1605647208872.png

yep still defined tables. they are full of lookup and calculate formulas with the ranking column being my desired column to keep in order.
 
Upvote 0
Has your computer been shut down and restarted since you returned from lunch ? Maybe it just needs a boot in the ...
 
Upvote 0
Has your computer been shut down and restarted since you returned from lunch ? Maybe it just needs a boot in the ...
Just restarted and haven't had any data Update as of yet, to try again.

does the VBA look correct to be triggered by a change in the table?
 
Upvote 0
It does at first glance. But I haven't tested it here.
If it worked before and you haven't changed anything then ....
 
Upvote 0

Forum statistics

Threads
1,214,656
Messages
6,120,762
Members
448,991
Latest member
Hanakoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top