Das bekommst Du doch selber hin. Ich sag nur: DannenhöferAllerdings würd ich gern, daß sich das Makro "showcolumnF" die Kundennr. aus Tab. 3 holt . Ginge das???

Gruß
balu
Moderator: Moderatoren
Das bekommst Du doch selber hin. Ich sag nur: DannenhöferAllerdings würd ich gern, daß sich das Makro "showcolumnF" die Kundennr. aus Tab. 3 holt . Ginge das???
dann hast du vermutlich die Formel in 'Eingabemaske Kunden'.F7 nicht mit genommenJörg hat geschrieben:Aber das Makro "ChangeCustomerData (document, Basic)" funzt nicht mehr.
"Pat. nicht im Bestand"
Ja so war es. Die ausgeblendete F-Spalte hatte mir noch Probleme beim Kopieren in Tab.1 gemacht, da ich hierfür ein anderes Makro verwende.hat wohl bei deiner Kopieraktion die Referenz verloren
Code: Alles auswählen
sub neuerKunde
antwort = msgbox("Daten speichern?",36,"Neuer Patient")
if antwort = 7 Then
exit sub
end if
rem define variables
odoc = ThisComponent
osheet = odoc.sheets(1)
orange = osheet.getCellRangeByName("A28:J28")
orangeAddress = orange.getrangeaddress
odata()= orange.getdataarray
oZielSheet = oDoc.sheets(0)
c = oZielSheet.getCellRangeByName("A1:A5000").queryEmptyCells
oZielCell = c(0).getcellbyposition(0,0)
oZielCellAddress = oZielCell.getcelladdress
X1=oZielCellAddress.column
Y1=oZielCellAddress.row
X2=oZielCellAddress.column+(orangeAddress.EndColumn-orangeAddress.StartColumn)
Y2=oZielCellAddress.Row+(orangeAddress.EndRow-orangeAddress.StartRow)
oZielrange=oZielSheet.getCellRangeByPosition(X1,Y1,X2,Y2)
oZielrange.setdataarray(odata())
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args5(0) as new com.sun.star.beans.PropertyValue
args5(0).Name = "Nr"
args5(0).Value = 2
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args5())
rem ----------------------------------------------------------------------
dim args6(0) as new com.sun.star.beans.PropertyValue
args6(0).Name = "ToPoint"
args6(0).Value = "$E$9:$E$17"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args6())
rem ----------------------------------------------------------------------
dim args7(0) as new com.sun.star.beans.PropertyValue
args7(0).Name = "Flags"
args7(0).Value = "SVD"
dispatcher.executeDispatch(document, ".uno:Delete", "", 0, args7())
rem ----------------------------------------------------------------------
dim args8(0) as new com.sun.star.beans.PropertyValue
args8(0).Name = "ToPoint"
args8(0).Value = "$E$9"
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args8())
end sub
Aber Ja!Allerdings würd ich gern, daß sich das Makro "showcolumnF" die Kundennr. aus Tab. 3 holt . Ginge das???
Code: Alles auswählen
myDoc = thisComponent
mySheet = myDoc.sheets(1)
mycell = mysheet.getCellrangebyName("E8")
mycell.Formula = "='Eingabemaske Abr_Rechnung'.C10"
myDoc = thisComponent
mySheet = myDoc.sheets(1)
myView = myDoc.CurrentController
for i=0 to 8
mysheet.getCellByPosition(5,8+i).string =""
next
oSpalte = mySheet.getcolumns().getByIndex(5)
oSpalte.isVisible = true
mycell = mysheet.getCellByPosition(5,8)
myView.Select(mycell)
oForm = mySheet.drawpage.forms.getbyindex(0)
oControl = oForm.getByName("Schaltfläche 1")
oControl.enablevisible = false
oControl = oForm.getByName("Schaltfläche 2")
oControl.enablevisible = false
oControl = oForm.getByName("Schaltfläche 4")
oControl.enablevisible = false
oControl = oForm.getByName("Schaltfläche 7")
oControl.enablevisible = false
oControl = oForm.getByName("Schaltfläche 5")
oControl.enablevisible = true
oControl = oForm.getByName("Schaltfläche 6")
oControl.enablevisible = true
end sub
Code: Alles auswählen
sub GoCorrectData(event)
....
end if
call showColumnF
end sub
Code: Alles auswählen
sub GoCorrectData(event)
....
call showColumnF
end if
end sub