本文介绍了错误?将注释添加到非连续范围时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用VBA向命名范围添加注释。通常没问题:



$
使用ActiveWorkbook.Names("TestRange")

         .Name =" TestRange"

        .RefersToR1C1 =" = Tabelle1!R13C6"

        .Comment =" Test"

End with



但如果范围有非连续区域,我会收到错误信息。



使用ActiveWorkbook.Names("测试范围")

        .Name =" Testrange"

        .RefersToR1C1 =" = Tabelle1!R13C6,Tabelle1!R16C8" b
        .Comment =" Test"

End with



任何解决方案?

I want to add a comment to a named range with VBA. Normally it is no problem:


With ActiveWorkbook.Names("TestRange")
        .Name = "TestRange"
        .RefersToR1C1 = "=Tabelle1!R13C6"
        .Comment = "Test"
End With

But if the range has non-contiguous areas, I get an error message.

With ActiveWorkbook.Names("Testrange")
        .Name = "Testrange"
        .RefersToR1C1 = "=Tabelle1!R13C6,Tabelle1!R16C8"
        .Comment = "Test"
End With

Any solutions?

推荐答案


这篇关于错误?将注释添加到非连续范围时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 02:38