取り消し線を設定する(Strikethrough プロパティ)
取り消し線を設定する(Strikethrough プロパティ)
Strikethrough プロパティに、True を設定すると指定した対象に取り消し線が表示されます。値の取得および設定が可能です。
【書式】
<取得>
object.Strikethrough
<設定>
object.Strikethrough = boolean
引数・戻り値
- object ・・・ 対象となる Font オブジェクトを指定します。
- boolean ・・・ ブール型(Boolean)の値を使用します。True を設定すると取り消し線が表示されます。
取り消し線を設定(Strikethrough プロパティ) 使用例
サンプルVBAソース
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
Sub Sample_Font04() With Range("B2") .Value = "あいうえおかきくけこ" .Font.Size = 14 .Font.Strikethrough = True .EntireColumn.AutoFit End With With Range("B5") .Value = "たちつてとなにぬねの" .Font.Size = 20 .Characters(Start:=6, Length:=3).Font.Strikethrough = True .EntireColumn.AutoFit End With End Sub |
実行結果
関連記事
-
-
書式を変換(Format 関数)
Format 関数の使い方 【書式】 result = Format ( exp …
-
-
Split 関数(文字列型の一次配列を作成)
Split 関数の使い方 【書式】 myArray = Split ( expr …
-
-
文字列:文字列を検索してその最初の文字位置を返す(InStr 関数,InStrB 関数)
InStr 関数・InStrB 関数の使い方 【書式】 result = { I …
-
-
インプットボックスを表示する(InputBox関数・InputBoxメソッド)
「InputBox関数」と「InputBoxメソッド」の違い 「InputBox …
-
-
IME の現在の状態を取得します(IMEStatus 関数)
IMEStatus 関数の使い方 【書式】 result = IMEStatus …
-
-
色の設定(ColorIndex プロパティ・Colors プロパティ)
ColorIndex プロパティ ColorIndex プロパティは、指定したオ …
-
-
引数が省略されたかどうかをチェックする( IsMissing 関数 )
IsMissing 関数の使い方 【書式】 result = IsMissing …
-
-
メッセージボックスを表示(MsgBox関数)
MsgBox関数 【書式】 result = MsgBox ( Prompt [ …
-
-
Erase ステートメント(配列の初期化・動的配列のメモリ解放)
Erase ステートメントの使い方 【書式】 Erase myArray [, …
-
-
変数のデータ型・宣言(Dim ステートメント)
変数の宣言 一般的な方法 【書式】 Dim varname [ As type, …
