国产成人AV一区二区三区在线_国产成人精品无码免费看_国产成人无码无卡在线观看_国产精品成人A区在线观看_国产日韩精品欧美一区_国产亚洲精品自在久久蜜TV_久草热久草热线频97精品_久久久噜噜噜久久中文福利_久久婷婷五月综合色国产免费观看_日日狠狠久久偷偷色综合0,九一桃色在线观看,久久97精品久久久久久久不卡,国产成人精品亚洲精品

wps宏運(yùn)行時(shí)錯(cuò)誤13類型不匹配

訪客2025-01-16 22:04:021

wps宏運(yùn)行時(shí)錯(cuò)誤13類型不匹配Sub AAA() Dim dic As New Dictionary Dim dicT As New Dictionary With Sheet1 ER1 = .Range("A" & .Rows.Count).End(3).Row If ER1 <= 1 Then MsgBox "沒有關(guān)鍵詞!" Exit Sub End If arr = .Range("A1").Resize(ER1).Value For i = 2 To UBound(arr) temp = Trim(LCase(arr(i, 1))) If InStr(temp, " ") <= 0 Then dic(temp) = 1 Else dicT(" " & temp & " ") = 1 End If Next arrKS = dicT.Keys dicT.RemoveAll er2 = .Range("B" & .Rows.Count).End(3).Row For i = 2 To er2 temp = .Range("B" & i).Value If temp <> "" Then dicT(temp) = 1 End If Next If dicT.Count > 0 Then arrWS = dicT.Keys Else MsgBox "請?zhí)钊胩鎿Q內(nèi)容所在表名!" Exit Sub End If dicT.RemoveAll er3 = .Range("C" & .Rows.Count).End(3).Row For i = 2 To er3 temp = .Range("C" & i).Value If temp <> "" Then dicT(temp) = 1 End If Next If dicT.Count > 0 Then arrCol = dicT.Keys Else MsgBox "請?zhí)钊胩鎿Q內(nèi)容所在列名!" Exit Sub End If End With With Application.FileDialog(msoFileDialogOpen) .InitialFileName = ThisWorkbook.Path .AllowMultiSelect = False .Title = "選擇處理文件" .Filters.Clear .Filters.Add "xlsx文件", "*.xlsx" .Filters.Add "所有文件", "*.*" If .Show = -1 Then strFName = .SelectedItems.Item(1) PFile strFName, dic, arrKS, arrWS, arrCol End If End WithEnd SubSub PFile(strFName, dic As Dictionary, arrKS, arrWS, arrCol) Application.ScreenUpdating = False Dim wb As Workbook Dim ws As Worksheet' Set wb = Workbooks.Open(strFName) Set wb = FindWorkbook(strFName) If wb Is Nothing Then MsgBox FNameTemp & "_文件打開失敗!" Exit Sub End If For i = 0 To 0 'UBound(arrWS) Set ws = FindWS(wb, arrWS(i)) If ws Is Nothing Then strMsg = wb.Name & " _ " & "未找到[" & arrWS(i) & "]表" MsgBox strMsg GoTo line1 End If Dim strWSName As String strWSName = ws.Name CN = UBound(arrCol) Dim arrCI() ReDim arrCI(0 To CN) For ii = 0 To CN strColName = arrCol(ii) colN = FindCol(ws, strColName) If colN = 0 Then strMsg = ws.Parent.Name & " _ " & "未找到[" & strColName & "]列" MsgBox strMsg GoTo line1 End If arrCI(ii) = colN Next For ii = 0 To CN PX1 ws, arrCI(ii), dic, arrKS Next Next

Dim dic As New Dictionary

這個(gè)自定義類型你沒有定義,程序無法運(yùn)行。所以,你上傳的代碼不全,。

僅僅這一句來說,,

temp = Trim(LCase(arr(i, 1)))

沒有問題,。

文章評論