我现在做的是要把显示出来的表格数据打印出来,但是在运行时,总提示错误,说是溢出,小女子百思不得其解,程序段如下
G.Clear: G.Rows = iEndRow - iBeginRow + 1 + 1     
    K = 0: iTmp = 110: iGridWidth = 0
    For i = 0 To grddata.Cols - 1
       If Mid(mstrPrintCol, i + 1, 1) = "1" Or _
          InStr(Left(mstrPrintCol, Len(mstrPrintCol) - 1), "1") = 0 Then
         K = K + 1
         G.Cols = K
        If .ColWidth(i) > 100 Then
          G.ColWidth(K - 1) = .ColWidth(i) * iTmp / 100
        Else
          G.ColWidth(K - 1) = 0
        End If
               G.TextMatrix(0, K - 1) = .TextMatrix(0, i)        For j = 1 To G.Rows - 1
        G.TextMatrix(j, K - 1) = .TextMatrix(iBeginRow + j, i)
        Next             当循环到这里时,就出错了
        j = 0
        iGridWidth = iGridWidth + G.ColWidth(K - 1)
       End If
    Next i
 End With
注:i 是总列数
 J 是代表在依次打印每一列时,从上往下的行数,
请各位帮忙,看看这是怎么回事,谢谢啦!!!!!!