# Revision history [back]

This option, have sense only in visible sheet, so, you can apply when activate or activate and return to current activate sheet.

doc = ThisComponent
cc = doc.CurrentController
current = cc.Selection
sheet = doc.Sheets(0)
cc.select(sheet)
cc.freezeAtPosition(5,5)
cc.select(current)


This option, have sense only in visible sheet, so, you can apply when activate or activate and return to current activate sheet.

doc = ThisComponent
cc = doc.CurrentController
current = cc.Selection
sheet = doc.Sheets(0)
cc.select(sheet)
cc.freezeAtPosition(5,5)
cc.select(current)


EDIT:

I don't understand, "avoid", you need save your reference to current sheet in some place if you want return after, but... that large lines are ugly for me.

This option, have sense only in visible sheet, so, you can apply when activate or activate and return to current activate sheet.

doc = ThisComponent
cc = doc.CurrentController
current = cc.Selection
sheet = doc.Sheets(0)
cc.select(sheet)
cc.freezeAtPosition(5,5)
cc.select(current)


EDIT:

I don't understand, "avoid", you need save your reference to current sheet in some place if you want return after, but... that large lines are ugly for me.

This option, have sense only in visible sheet, so, you can apply when activate or activate and return to current activate sheet.

doc = ThisComponent
cc = doc.CurrentController
current = cc.Selection
sheet = doc.Sheets(0)
cc.select(sheet)
cc.freezeAtPosition(5,5)
cc.select(current)


This option, have sense only in visible sheet, so, you can apply when activate or activate and return to current activate sheet.

doc = ThisComponent
cc = doc.CurrentController
current = cc.Selection
sheet = doc.Sheets(0)
cc.select(sheet)
cc.freezeAtPosition(5,5)
cc.select(current)