我的代码片段很短& 简单,但我仍然无法让它工作。
Dim feld As Variant
Dim Num As Variant
Dim strNum As String
Dim Bank As String
Bank = IIf(DKB.Value = True, "DKB", IIf(DB.Value = True, "DB", IIf(Kasse.Value = True, "Kasse", "BfS")))
strNum = Sheets(Bank).Range("B11").Value
feld = Split(strNum, "_")
strNum的值是 "202_DKB_02"。
如果我试着运行它,我在最后一步得到一个类型不匹配的错误。有什么问题吗?