Excel加载项:如何取消选择区域? [英] Excel Add-In: How to deselect a region?

查看:420
本文介绍了Excel加载项:如何取消选择区域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我以编程方式将工作表复制并粘贴到当前工作表后,整个目标仍处于选中状态。


过去似乎有一些'取消选择( )'功能?我试图只选择单元格[1,1],但应用程序崩溃时出现COM错误。


这是一个很多网站,我无法解决这个问题:


    https://www.pcreview.co.uk/threads/programmatically-deselect-a-selection.2412034/


TIA


解决方案

Hello MigrationUser1,


>> 我以编程方式将工作表复制并粘贴到当前工作表中


您的意思是复制并通过另一个工作表当前工作簿的工作簿?或者将一个范围从另一个工作表复制并传递到当前工作表?


>>  尝试仅选择
单元格[1,1],但应用程序因COM错误而崩溃


< span style ="color:#666666"> 如何选择单元格[1,1]?什么是错误消息?


我建议你分享了一些代码,所以我们可以尝试用它来重现你的问题。


最好的问候,


特里


After I programmatically copy and paste-special a worksheet into the current worksheet, the whole target remains selected.

It seems that in the past there was some 'Deselect()' function? I have tried to select only the cell [1,1] but the app crashes with a COM error.

This is one a many sites in which I cannot a solution that works:

    https://www.pcreview.co.uk/threads/programmatically-deselect-a-selection.2412034/

TIA

解决方案

Hello MigrationUser1,

>>After I programmatically copy and paste-special a worksheet into the current worksheet

Do you mean copy and past a worksheet from another workbook to current workbook? Or copy and past a range from another worksheet to current worksheet?

>> have tried to select only the cell [1,1] but the app crashes with a COM error

How do you select the cell[1,1]? What's the error message?

I would suggest you share some code so we could try to use it to reproduce your issue.

Best Regards,

Terry


这篇关于Excel加载项:如何取消选择区域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆