Hallo Gabriel,
ich hab mal das folgende probiert:
in einem Sheet habe ich 2 Formulare hergestellt. Das sheet heist Tabelle1, die Formulare heisen gafuform1 und gafuform2. Die Textfelder in jedem Formular jeweils txt1 und txt2.
Dann habe ich Deine Routine für jedes Form geschrieben. so:
Code: Alles auswählen
REM ***** BASIC *****
option explicit
sub main
linksrechts1()
linksrechts2()
end sub
sub linksrechts2
dim txtNotiz2 as String
oForm = Globalscope.thisComponent.sheets.getByname("Tabelle1").drawPage.forms.getbyname("gafuform2")
with oForm
txtNotiz2 =.getByName("txt1").text
.getByName("txt2").text= txtNotiz2
End With
end sub
sub linksrechts1
dim txtNotiz2 as String
oForm = Globalscope.thisComponent.sheets.getByname("Tabelle1").drawPage.forms.getbyname("gafuform1")
with oForm
txtNotiz2 =.getByName("txt1").text
.getByName("txt2").text= txtNotiz2
End With
end sub
Das geht natürlich auch in einem WriterDokument.
Die subs funktionieren. Allerdings bin ich mir nicht sicher, ob mein Aufbau dem entspricht, was Du möchtest. Vielleicht verstehe ich auch Dein Problem nicht.
Gruß
Gerd