SSブログ

LibreOffice 拡張機能 Code Colorizer Formatter [LibreOffice全般]

LibreOffice 拡張機能 Code Colorizer Formatter
OS LinuxMint18.3 Cinnamon 64bit
LibreOffice 6.03
MacroformatterADP-4.1.1.oxt をlibreofficeで開く
macroformatterADP.png
Basicコードに色つける。
BasicIDE のコードをコピーしてwriterに貼り付ける。
writer ツール → アドオン → MacroformatterADP  → Basic → 色はBasicを選んだ
macroformatterADP2.png
貼り付けたコード選択して
writer ツール → アドオン → MacroformatterADP  → Basic → 色はBasicを選んだ
を実行する。
コードに色が設定される。
macroformatterADP3.png

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


nice!(1)  コメント(0) 
共通テーマ:パソコン・インターネット

nice! 1

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。

LinuxMint 19 "Tara" ..LinuxMint18.3Cinnamo.. ブログトップ


Linuxランキング

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。