相关疑难解决方法(0)

如果数组已由Range指定,则LBound和Ubound冲突

    height = objExcel1.Application.WorksheetFunction.CountA(ob3.Columns(1))
    'MsgBox(height)
    ReDim dataArray(height - 2, 0) ' -1 for 0 index, -1 for the first row as header row, excluded
    str = ""
    dataArray = ob3.Range(ob3.Cells(2, 1),ob3.Cells(height, 1)).Value
    Set d = CreateObject("scripting.dictionary")
    'MsgBox(LBound(DeletArr) & ":" & UBound(DeletArr))
    For i = LBound(DeletArr) To UBound(DeletArr)
        If Not d.exists(DeletArr(i)) Then
            d(DeletArr(i)) =  0
        End If
    Next
    MsgBox(LBound(dataArray,1) & ":" & UBound(dataArray,1))
    For i = LBound(dataArray, 1)  To UBound(dataArray, 1) - 1

        If d.exists(dataArray(i, 1)) Then

            str = str & …
Run Code Online (Sandbox Code Playgroud)

vbscript excel vba excel-vba

1
推荐指数
1
解决办法
7085
查看次数

标签 统计

excel ×1

excel-vba ×1

vba ×1

vbscript ×1