ListBox1.Clear Dim str As String Dim i,j As Integer row=InputBox("Enter Rows"); col=InputBox("Enter Columns"); For i=1 to row str="" For j=1 to col matrix[i,j]=InputBox("Enter no for rows"&i&"and column"&j) str=str&space$(3)&matrix[i,j] Next ListBox1.Add(str) Next End Public Sub Button2_Click() ListBox2.Clear Dim Str As String Dim i,j As Integer For i=1 to col str="" For j=1 to row matrix2[i,j]=matrix1[j,i] str=str&Space$(3)&matrix2[i,j] Next ListBox2.Add(str) Next End Public Sub Button4_Click() Form1.Close End Public Sub Button3_Click() ListBox3.Clear Dim str As String dim i,j,k As Integer For i=1 to row str="" For j=1 to row matrix3[i,j]=0 For k=1 to col matrix3[i,j]=matrix3[i,j]+matrix1[i,k]*matrix2[k,j] Next str=str&space$(3)&matrix3[i,j] Next ListBox3.Add(str) Next End