Hello,
Never used Calc before.
I have a list of value where I can update them. I have a Push Button linked to a macro. When I type the last cell and click the button the last entry is not taken into account. The green V is still there and my macro can't take the value.
Any idea what I should put in my macro to validate the last entry?
Thanks,
Claudy
[Solved] Last cell validation
[Solved] Last cell validation
Last edited by MrProgrammer on Fri Dec 27, 2019 11:14 pm, edited 2 times in total.
Reason: Moved from Calc forum to Macros and UNO API
Reason: Moved from Calc forum to Macros and UNO API
OpenOffice Version 4.7.1
Windows 10
Windows 10
Re: Last cell validation
Please upload your file so we can see what is happening. To upload a file, click Post Reply and look for the Upload Attachment tab just below the box where you type a response.
It is not clear what you want this macro to do. Can you explain more about that?
It is not clear what you want this macro to do. Can you explain more about that?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Re: Last cell validation
The macro itself is ok but I attach it. The last value recorded in Achat or Vente column with moving out of the cell is not validated for the macro.
Thanks for your help.
Thanks for your help.
- Attachments
-
- Stock_Alain_OOC.ods
- (24.39 KiB) Downloaded 156 times
OpenOffice Version 4.7.1
Windows 10
Windows 10
Re: Last cell validation
Hello,
if you finish your last entry by Enter your entry will be accepted.
if you finish your last entry by Enter your entry will be accepted.
LibreOffice 5.4, 7.0, 7.2 on LinuxMint/Win10
Re: Last cell validation
Indeed but it should be possible to do it in my macro, no ? The guy who is going to use the sheet is not a geek and will most of the time forget it.
OpenOffice Version 4.7.1
Windows 10
Windows 10
Re: Last cell validation
Then you need something more professional than a spreadsheet. Spreadsheets are extremely diffcult to use.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Last cell validation
Hello,
a workaround would be to temporarely select another cell (and back).
Insert these rows
after
a workaround would be to temporarely select another cell (and back).
Insert these rows
Code: Select all
'switch to a different cell and back
otemp=sheet.getcellbyposition(0,0)
oOldcell=Doc.currentselection
Doc.CurrentController.Select(otemp)
Doc.CurrentController.Select(oOldcell)
oDummy = Doc.createInstance("com.sun.star.sheet.SheetCellRanges")
Doc.CurrentController.Select(oDummy)
Code: Select all
Sheet = Doc.getSheets.getByName("Liste Produit")
- Attachments
-
- Stock_Alain_OOC.ods
- (28.29 KiB) Downloaded 158 times
LibreOffice 5.4, 7.0, 7.2 on LinuxMint/Win10