The user enters value into cell $C$3 (for example) then activates a macro by means of a button event. If the user did not deselect the active cell before the button event then the data edit for $C$3 is still in process and the macro will not see the user’s value. So the question is whether there is a means via the macro to force the cell edit action to completion? I’ve tried oSheet = ThisComponent.Sheets.getByName(“TheSheet”) : oCell = oSheet.getCellByPosition(0,0) : oCell = " " without success. Evidently macro cell references do not work exactly the same as active sheet cell selection.
Hi all. I have discovered a means to change the FOCUS to the 0,0 cell. Here it is:
Sub uSelectHome
dim document as object
dim dispatcher as object
dim args1(0) as new com.sun.star.beans.PropertyValue
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService(“com.sun.star.frame.DispatchHelper”)
args1(0).Name = “ToPoint”
args1(0).Value = “$A$1”
dispatcher.executeDispatch(document, “.uno:GoToCell”, “”, 0, args1())
End Sub