[Solved] How to change a list controls linked cell?

Discuss the spreadsheet application

[Solved] How to change a list controls linked cell?

Postby jody » Sun Jun 22, 2008 5:33 pm

Hi

I have a table in which a cell in row "F" may only have values of a predefined set of strings.
For this task, a list controls seems appropriate.

I managed to create a one-row table with list control whose linked cell is the cell in question.
Now this should be possible for inputs on a new row, too.
The question is, how do i change the linked cell of a list control, without modifying the property by hand?

My idea is to have a "counter" cell containing the rownumber of the last row),
and a button "new row" on the spread sheet.
Pressing the button should increase the value of the counter and use this new
value to modify the linked cell of the list control so it points to the "F"-cell in this new row.

My problem is that
- i don't know how to read and write values to or from spreadsheet cells in a macro
- i don't know how to set the linked cell property of the list control in a macro

I didn't find any info for these questions in the openoffice-help.

I would very much appreciate any suggestions how to do this,
or pointers to where i can find a sort of documentation of
the calc macro language covering the manipulation of cells and controls.

Thanks in advance
Jody
Last edited by Hagar Delest on Sun Jun 22, 2008 10:58 pm, edited 1 time in total.
Reason: tagged the thread as Solved.
jody
 
Posts: 10
Joined: Sun Jun 22, 2008 3:40 pm

Re: how to change a list controls linked cell programmatically?

Postby Villeroy » Sun Jun 22, 2008 5:56 pm

Use a database with forms. Or use validation by ranges instead of form controls:
download/file.php?id=333
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28851
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: how to change a list controls linked cell programmatically?

Postby jody » Sun Jun 22, 2008 7:19 pm

Thanks!
Validation by ranges is what i need!
OOo 2.3.X on Fedora 8
jody
 
Posts: 10
Joined: Sun Jun 22, 2008 3:40 pm


Return to Calc

Who is online

Users browsing this forum: No registered users and 32 guests