Ask Your Question

OldEng's profile - activity

2020-06-04 20:27:17 +0200 received badge  Popular Question (source)
2020-06-04 20:26:46 +0200 received badge  Famous Question (source)
2020-02-25 22:41:10 +0200 received badge  Enthusiast
2020-02-22 15:28:36 +0200 marked best answer How to assign/modify validity range in Calc using Basic Macro.

I have a column of cells with data on a Calc sheet $C$4:$C$9. I would like this range of cell data to appear as a drop down pick list for a different cell $C$3 on the same sheet. I can do that using the menu approach Data>Validity... Allow: Cell range and then enter the range for the column of data. That is NOT what I am trying to do. Rather, I wish to assign the cell range programmatically using a BASIC macro so when new data is appended at $C$10 I an update the range in $C$3. I can use oSheetTest = ThisComponent.Sheets.getByName("Cities") oCellTest = oSheetTest.getCellRangeByName("$C$3") to access the desired cell but I am at a loss to figure out how to assign/modify the range of the column of data to that cell.

2020-02-22 15:28:36 +0200 received badge  Scholar (source)
2020-02-22 15:28:20 +0200 received badge  Notable Question (source)
2020-02-20 17:48:34 +0200 received badge  Popular Question (source)