Assigning Value to Two Dimension Array <p>I am trying to assign values to a 2D array in VBA but its not working. Here is what I have tried: </p> <pre><code>Sub UpdateCustomName() Dim CellTags() As String Dim temp() As String Dim ControlName As String Dim CellValue As String Dim CustomName(1 To 2, 1 To 2) As String For Each Cell In ActiveSheet.UsedRange.Cells If Not Cell.Value = "" Then CellTags() = Split(Cell.Value, "*") ' here in CellTags(2) value is like ABC_E34 CustomName() = Split(CellTags(2), "_") MsgBox CustomName(1, 2) End If Next End Sub </code></pre>