首页 > 解决方案 > 为什么我的代码仍然写在选定的单元格而不是我选择的单元格上

问题描述

我正在研究:版本:6.2.8.2 (x64) 构建 ID:f82ddfca21ebc1e222a662a32b25c0c9d20169ee CPU 线程:4;操作系统:Windows 10.0;UI 渲染:默认;VCL:赢;语言环境:en-GB (fr_FR);UI 语言: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","",0,args1())
args2(0).Name="StringName" 
args2(0).Value="String String :" 

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

End sub 


如果你有一些线索为什么它会这样,非常感谢!

标签: basic

解决方案


推荐阅读