LibreOffice 拡張機能 Code Colorizer Formatter [LibreOffice全般]
LibreOffice 拡張機能 Code Colorizer Formatter
OS LinuxMint18.3 Cinnamon 64bit
LibreOffice 6.03
MacroformatterADP-4.1.1.oxt をlibreofficeで開く
Basicコードに色つける。
BasicIDE のコードをコピーしてwriterに貼り付ける。
writer ツール → アドオン → MacroformatterADP → Basic → 色はBasicを選んだ
貼り付けたコード選択して
writer ツール → アドオン → MacroformatterADP → Basic → 色はBasicを選んだ
を実行する。
コードに色が設定される。
Sub selectedCellOnly()
'選択範囲のみ入力できるようにするマクロ
'シート保護のパスワードは(Test)
Dim myProtection As New com.sun.star.util.CellProtection
'シート保護解除
ThisComponent.CurrentController.activesheet.unprotect("Test")
'選択範囲のセルに背景色を設定
ThisComponent.CurrentController.selection.CellBackColor =RGB(255,255,200)
'セルの保護を解除する
myProtection.IsLocked=false
ThisComponent.CurrentController.selection.CellProtection=myProtection
'シート保護
ThisComponent.CurrentController.activesheet.protect("Test")
End Sub
コメント 0