iferror

IFERROR in in this macro?

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The problem is that when I change the value in I16 or I17 I get an error. How can I prevent this error from happening? I check in I16 and I17 for the sheetnames, because every week an updated sheet comes available. Thank you Sub Compare () Call compareSheets ( range ( "I16" ). Value , range ( "I17" ). Value ) End Sub Sub compareSheets ( Sofon As String , Sofon2 As String ) Dim mycell As range Dim mydiffs As Integer For Each mycell In ActiveWorkbook . Worksheets ( Sofon2 ). range ( "M:M" ) If Not mycell . Value = ActiveWorkbook .