[Solved] Calc Macro to setFocus to a particular cell
Posted: Tue Mar 10, 2015 3:37 pm
I have a spreadsheet with an entry sheet, and several data sheets.
I have a button on the entry sheet that runs a macro that moves all of the data from the entry sheet to the various data sheets where the data belongs.
At the end of the macro, it clears the entry sheet so it's ready for the next entry.
I'm looking for a way to have it set the focus on cell C3 at the end of the macro.
This what I have and it doesn't work:
Sheet = thisComponent.Sheets.getByName("EnterData1")
Cell = Sheet.getCellRangeByName("C3")
Cell.setFocus
I've scoured the forums and haven't found an answer to this yet....
Any help would be most appreciated.
I have a button on the entry sheet that runs a macro that moves all of the data from the entry sheet to the various data sheets where the data belongs.
At the end of the macro, it clears the entry sheet so it's ready for the next entry.
I'm looking for a way to have it set the focus on cell C3 at the end of the macro.
This what I have and it doesn't work:
Sheet = thisComponent.Sheets.getByName("EnterData1")
Cell = Sheet.getCellRangeByName("C3")
Cell.setFocus
I've scoured the forums and haven't found an answer to this yet....
Any help would be most appreciated.