Why my code still write on the selected cell instead of the cell I choosed

I’m working on : Version: 6.2.8.2 (x64) Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; Locale: en-GB (fr_FR); UI-Language: en-GB Calc: CL

I’m training at Basic and I want to write something in a precise cell (For that one I choosed M1 but it can be anything else.)

But no matter what I’m doing it keeps writing it in the selected cell on my spreadsheet.

Here is my code :

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 

If you can explain me what I did wrong ! thanks !

[Edit - Opaque] put code preformatted text

Hello,

args1(0).Name="To.Point" must read:
args1(0).Name="ToPoint"

Hope that helps

ah yes ! Thank you very much !