Respected Experts,

I am not able to run the following Macro in Excel in Mac computer. I am getting Runtime Error 429 - ActiveX Component Can't Create Object and it is on code
Set Dict = CreateObject("Scripting.Dictionary").

Kindly help me tweak the code as per the Mac capabilities.

Sub UpdatecampaignId()
    
    Dim DR As Long
    Dim Cell As Range
    Dim Dict As Object
    Dim Key As String
    Dim Item As Variant
    Dim rng  As Range
    Dim Wks As Worksheet
    
    Set rng = Rows(1).Find("campaignId")
    If Not rng Is Nothing Then
            DR = rng.Column
    
        Set Dict = CreateObject("Scripting.Dictionary")
        Dict.CompareMode = vbTextCompare
        
        Set Wks = Worksheets("campaignId")
        
        Set rng = Wks.Range("A1").CurrentRegion
        Set rng = Intersect(rng, rng.Offset(1, 0))
        
        For Each Cell In rng.Columns(1).Cells
            Key = Trim(Cell)
            Item = Cell.Offset(0, 1)
            If Key <> "" Then
                If Not Dict.exists(Key) Then Dict.Add Key, Item
            End If
        Next Cell
        
        Set Wks = Worksheets("Copied Sheet")
        
        Set rng = Wks.Range("A1").CurrentRegion
        Set rng = Intersect(rng, rng.Offset(1, 0).Columns(DR))
        
        For Each Cell In rng
            Key = Trim(Cell)
            If Dict.exists(Key) Then Cell = Dict(Key): Cell.Interior.ColorIndex = 6
        Next Cell
        End If
End Sub