为什么我的代码仍然写在选定的单元格而不是我选择的单元格上

问题描述

我正在开发:版本:6.2.8.2 (x64) 内部版本 ID:f82ddfca21ebc1e222a662a32b25c0c9d20169ee cpu线程:4;操作系统:Windows 10.0; UI渲染:认; VCL:赢; 语言环境:en-GB (fr_FR);用户界面语言:en-GB 计算:CL

我在 Basic 接受培训,我想在一个精确的单元格中写一些东西(对于那个,我选择了 M1,但它可以是其他任何东西。)

但无论我在做什么,它都会一直将它写入电子表格的选定单元格中。

这是我的代码

sub TryAgain 

Dim document as object 
Dim dispatcher as object 

document = ThisComponent.CurrentController.Frame 
dispatcher = createUnoService("com.sun.star.frame.dispatchHelper") 

Dim args1(0) as new com.sun.star.beans.PropertyValue 
Dim args2(0) as new com.sun.star.beans.PropertyValue 

args1(0).Name="To.Point" 
args1(0).Value="$M$1"

dispatcher.Executedispatch(document,".uno:GoToCell","",args1())
args2(0).Name="StringName" 
args2(0).Value="String String :" 

dispatcher.Executedispatch(document,".uno:EnterString",args2())
MsgBox "Done" 

End sub 


如果你知道为什么会这样,非常感谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)