シートをアクティブにする LibreOffice Calc Basic [LibreOffice Calc Basic]
シートをアクティブにする LibreOffice Calc Basic
Sub sheetActive()
'シートをアクティブにする
Dim oSheetName As String
Dim oSheet As Object
'
oSheetName="Sheet3"
oSheet=ThisComponent.getSheets().getbyName(oSheetName)
'シートをアクティブに
ThisComponent.getCurrentController().setActiveSheet(oSheet)
'A1に5000
oSheet.getCellByPosition(0,0).value=5000
End Sub
一行にまとめると 、、、
ThisComponent.getCurrentController().setActiveSheet(ThisComponent.getSheets().getbyName("Sheet3"))
追記
Sheet選択をIndex()で・・・
Sub sheetActive2
'Sheet名ではなくIndexで・・・番号はゼロから・・・
Dim oSheet as Object
'getByIndex()でsheet2をセット
oSheet=ThisComponent.getSheets().getByIndex(1) 'Sheet2
'Index(1) Sheet2をアクティブにする
ThisComponent.getCurrentController().setActiveSheet(oSheet)
End Sub
アクティブにしたシートのセルA1を選択する
Sub sheetActive3()
'Sheet名ではなくIndexで・・・番号はゼロから・・・
Dim oSheet as Object
Dim oCell as Object
'getByIndex()でsheet2をセット
oSheet=ThisComponent.getSheets().getByIndex(1) 'Sheet2
'Index(1) Sheet2をアクティブにする
ThisComponent.getCurrentController().setActiveSheet(oSheet)
'Cell(0,0) Range("A1") を選択
oCell=ThisComponent.getCurrentController().getActiveSheet.getCellByPosition(0,0)
ThisComponent.getCurrentController().Select(oCell)
End Sub
Algodones <a href=https://viacialisns.com/#>generic 5mg cialis best price</a> Acheter Du Cialis En France <a href=https://viacialisns.com/#>Cialis</a> Propecia Vendo
by Janinsessy (2020-04-27 15:12)
Cialis E Simili https://agenericcialise.com/ - Generic Cialis Cialis Generico Dove Comprare <a href=https://agenericcialise.com/#>Generic Cialis</a> Can Amoxicillin Be Taken With Fluconazole
by SWADWAY (2020-06-17 17:39)