我想我有语法问题
我想检查是否为下一步操作填写了每个字段
我还有15个单元格要检查。
我的代码是有效的,因为and ("C24:C22")
,只有第一行给出了一个错误。
For Each Zellen_auf_Inhalt_prüfen In Range("B7:J7") and ("C24:C22")
If Zellen_auf_Inhalt_prüfen.Value = "" Then
MsgBox "Bitte alle Zellen ausfüllen."
GoTo MacroEnde
End If
Next Zellen_auf_Inhalt_prüfen
"Zellen auf inhalt prüfen"意思是,检查细胞中是否有任何东西。
我认为您正在寻找联合声明:
For Each Zellen_auf_Inhalt_prüfen In Union(Range("B7:J7"), Range("C24:C22"))