Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Rows not moving

I have a macro that reads a UPC code from a barcode reader. I have set up a listener on the cell, and receiving the data, I use the macro to look up the UPC code to get the price and description. I then place the price and description on the same worksheet as the listener cell by row. That seems to work ok, but when I enter more rows than what is showing, the cells do not move up. How can I always show the last row - or make the rows move up so the last row is visible? I have a frozen area at the top (rows 1-11) which contains buttons and information necessary to process the list of items. The inserted rows start at row 12 and go down to as many inputs as are necessary, but only the first 23 show! The user can use the slider bar to see the items pass row 23, but is there some method to show the last row? I tried ThisComponent.getCurrentController().setFirstVisibleRow(rowx), where rowx was the last row, but that did not work. Version 5.2.6.2 running on Anti-X 16.

Rows not moving

FIXED-sorta

I have a macro that reads a UPC code from a barcode reader. I have set up a listener on the cell, and receiving the data, I use the macro to look up the UPC code to get the price and description. I then place the price and description on the same worksheet as the listener cell by row. That seems to work ok, but when I enter more rows than what is showing, the cells do not move up. How can I always show the last row - or make the rows move up so the last row is visible? I have a frozen area at the top (rows 1-11) which contains buttons and information necessary to process the list of items. The inserted rows start at row 12 and go down to as many inputs as are necessary, but only the first 23 show! The user can use the slider bar to see the items pass row 23, but is there some method to show the last row? I tried ThisComponent.getCurrentController().setFirstVisibleRow(rowx), where rowx was the last row, but that did not work. Version 5.2.6.2 running on Anti-X 16.

Ok, I fixed this by placing my listener below the frozen row. Apparently, I have to give the focus to the cell where the listener is and when I do that, the whole window is re-written which means that even if I was able to move the row down, the re-writing of the window sets it back to where it was.

This is a Klunky fix, and instead of one cell as a listener, I am now using every row (in one column) as a listener. It works, but not as clean as having just one cell above the frozen rows.