How can I get a new active cell value that hasn't been saved yet?
The user entered a value in the edit mode, but did not exit the cell.
If I'm not mistaken, in Excel this cell property is called "Text" (ActiveCell.Text).
[Solved] How to get a cell value in the edit mode in Calc
[Solved] How to get a cell value in the edit mode in Calc
Last edited by eeigor on Fri Dec 25, 2020 1:50 pm, edited 1 time in total.
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: How to get a cell value in the edit mode in Calc
And what about the hitting Enter key?The user entered a value in the edit mode, but did not exit the cell.
If the entered value has not been accepted, then the value is not assigned to the active cell. It is stored only in a temporary buffer somewhere... (I do not know how, and where from you can get it)
When the value has been accepted by the Enter key or by leaving the cell, then you will able get the (textual or numeric) value FROM the cell.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to get a cell value in the edit mode in Calc
Alas, no. It is necessary to take the value from the buffer, if there is no corresponding property.
In any case, thank you for your feedback.
But maybe @Villeroy will respond and offer a solution?
In any case, thank you for your feedback.
But maybe @Villeroy will respond and offer a solution?
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: How to get a cell value in the edit mode in Calc
Have you tried to use the InputBox in your macro? By usage of the InputBox you can get the entered value BEFORE you assign it to a cell.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to get a cell value in the edit mode in Calc
Yes, that's what I just wrote about.
"I need to extend the entered value to other cells. But if the solution is cumbersome, then it is probably better to run the procedure before entering and accept the value via the InputBox() function."
But let's wait a bit…
UPD:
However, the value is a formula, and it would be better to write it in the formula bar…
"I need to extend the entered value to other cells. But if the solution is cumbersome, then it is probably better to run the procedure before entering and accept the value via the InputBox() function."
But let's wait a bit…
UPD:
However, the value is a formula, and it would be better to write it in the formula bar…
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community
Re: How to get a cell value in the edit mode in Calc
You can set theHowever, the value is a formula, and it would be better to write it in the formula bar…
- Value (numeric)
- Text (string)
- Formula (English like)
- Formulalocal (localized formula)
of a cell by your macro code.
Here are some samples from Villeroy - of course - :
viewtopic.php?f=75&t=76258
viewtopic.php?f=20&t=17428
Last edited by Zizi64 on Fri Dec 25, 2020 2:24 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: How to get a cell value in the edit mode in Calc
The question is removed, I was wrong.
Ubuntu 18.04 LTS • LibreOffice 7.5.3.2 Community