¡Hola!
Hace tiempo reporté un bug para LibreOffice Base:
https://bugs.documentfoundation.org/show_bug.cgi?id=164465
Como no se solucionaba realicé una prueba en LibreOffice Writer, creando un formulario con los mismos objetos que daban el error en la macro.
El bug es:
https://bugs.documentfoundation.org/show_bug.cgi?id=167189
Me indican que está solucionado. Qué la macro tiene errores.
Pero no sé dónde.
MACRO
Sub ActualizarFechaAnterior( Event )
obj = Event.Source.Model
fecha_seleccionada = obj.Text
fecha_anterior = DateAdd(“d”, -1, fecha_seleccionada)
frm = obj.Parent
obj_fecha_seleccionada = frm.getByName(“fecha_inicial”)
obj_fecha_seleccionada.BoundField.UpdateString(Format(fecha_seleccionada,“YYYY-MM-DD”))
obj_fecha_anterior = frm.getByName(“fecha_anterior”)
obj_fecha_anterior.BoundField.UpdateString(Format(fecha_anterior,“YYYY-MM-DD”))
frm.UpdateRow
End Sub
ERRORES
“Tipo de datos o valor indamisible. Discrepancia del tipo de datos.”
“Error de ejecución de BASIC. Variable de objeto no establecida.”
(Los errores los da en español. Abajo la traducción que he realizado.)
“Data type or indamisible value. Data type discrepancy.”
“BASIC execution error. Object variable not set.”
Respuesta de Mike Kaganski, en los comentarios del bug reportado:
"And it seems to me, that your initial “Data type or indamisible value. Data type discrepancy” is bug 166342, fixed in 25ant2.4 - which message I indeed don’t see in my 25.2.4.
… and it was already resolved duplicate, of that exact same bug. The bug was fixed, as mentioned; and version 25.2.4 with the fix is released; but you file this bug again.
OK, you report it in Version: 25.2.4.3; but your example does not show the error “Data type or indamisible value. Data type discrepancy” in it; and the “Object variable not set” is not a bug, but the matter of fact. How can the bug be reproduced? Is the “obj_fecha_seleccionada” and its “BoundField” relevant at all? Will a simple MsgBox, or another built-in function, be enough?"
Adjunto el formulario de Writer.
Gracias y un saludo.
Macros_pruebas.odt (13,1 KB)
Bancos_prueba_Firebird.odb (600,5 KB)