Failed Excel macro after 1/10/2023 windows update

Frequent Visitor

Below is a bold font step from a longer macro that was running fine multiple times fine through 1/09/2023.

On 1/10/2023 a Windows update was installed.  “2023-01 Cumulative Update for Windows 10, version 21H2 for x64-based systems (KB502282)”

The macro step has failed to run ever since despite multiple efforts to tweak the bold font step.  The error message is …

Run-time error ‘1004’:

AutoFilter method of Range class failed

In frustration, I copied the non-working file to a different computer running Office 365 that had been disconnected from the Internet.  The non-working macro (copied file) is currently running fine without error on the Office 365 computer.

How do I get the bold font step in a longer macro to work on a computer with the current (1/10/2023) Windows update? Thanks.

    ….

    Sheets("Data").Select

    Range("F1").Select

    ActiveSheet.Range("$A$1:$H$12345").AutoFilter Field:=6, Operator:= _

        xlFilterValues, Criteria2:=Array(2, _

        "1/9/2023", 2, "1/10/2023", 2, "1/11/2023", 2, "1/12/2023", 2, "1/13/2023", 2, "1/14/2023", 2, "1/15/2023", 2, "1/16/2023"), Operator:=xlFilterValues

    Columns("A:O").Select

    Range("O1").Activate

    ….

0 Replies