(sorry I’m new to this) so i pressed a row than that recall button then it said: BASIC runtime error. Property or method not found:CellAddress and it highlighted this: r=ThisComponent.CurrentSelection.CellAddress.Row (if i press recall its supposed to open up that row as an invoice) I didn’t create this
sub RecallfromRegi
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")
S=ThisComponent.CurrentController.ActiveSheet.Name
r=ThisComponent.CurrentSelection.CellAddress.Row
SSheet=ThisComponent.Sheets.getbyname("Set")
SSheet. getcellbyposition(1,49).string = S
SSheet. getcellbyposition(1,48).string = ""
If S = "InvRe" Then
SSheet.getcellbyposition(1,50).value =_
ThisComponent.Sheets.getbyname("InvRe").getcellbyposition(0,r).value
InvNo =SSheet. getcellbyposition(1,50).string
RecallMatch =SSheet. getcellbyposition(1,52).value + 1
LastRow =SSheet. getcellbyposition(1,53).value - 1
If InvNo = "" OR r < 205 OR r >= LastRow then
MsgBox ("You need to be on the row of the Invoice you want to recall.",64,"ERROR")
ThisComponent.CurrentController.Frame.getContainerWindow.setFocus(True)
Exit sub
End if
DeleteInvoice
ThisComponent.Sheets.getbyname("Inv").getcellbyposition(4,116).value=ThisComponent.Sheets.getbyname("Set").getcellbyposition(1,50).value
ElseIf S = "QuoRe" Then
SSheet.getcellbyposition(1,54).value =_
ThisComponent.Sheets.getbyname("QuoRe").getcellbyposition(0,r).value
InvNo =SSheet. getcellbyposition(1,54).string
RecallMatch =SSheet. getcellbyposition(1,56).value + 1
LastRow =SSheet. getcellbyposition(1,57).value - 1
If InvNo = "" OR r < 205 OR r >= LastRow then
MsgBox ("You need to be on the row of the Quote you want to recall.",64,"ERROR")
ThisComponent.CurrentController.Frame.getContainerWindow.setFocus(True)
Exit sub
End if
CancelQuote
ThisComponent.Sheets.getbyname("Quo").getcellbyposition(4,116).value=ThisComponent.Sheets.getbyname("Set").getcellbyposition(1,54).value
End If
RecallInv
end sub