- DatasheetGridlinesBehavior プロパティ
- データシートビューの縦横の枠線の表示状態を設定します。
次のようなVBA組み込み定数値が設定できます。
- acGridlinesNone → 枠線なし
- acGridlinesHoriz → 水平方向の枠線だけ表示
- acGridlinesVert → 垂直方向の枠線だけ表示
- acGridlinesBoth → 水平/垂直の両方の枠線を表示
- フォーム
-
Private Sub fraProperty_AfterUpdate()
'[プロパティの設定]オプショングループの更新後処理
With Me!フォーム048_sub.Form
Select Case Me!fraProperty
Case 1
'枠線なし
.DatasheetGridlinesBehavior = acGridlinesNone
Case 2
'水平方向の枠線だけ表示
.DatasheetGridlinesBehavior = acGridlinesHoriz
Case 3
'垂直方向の枠線だけ表示
.DatasheetGridlinesBehavior = acGridlinesVert
Case 4
'水平/垂直の両方の枠線を表示
.DatasheetGridlinesBehavior = acGridlinesBoth
End Select
End With
End Sub
- データシートの枠線を「なし」に設定した場合

- 「水平のみ」に設定した場合

- 「垂直のみ」に設定した場合

- 「両方」に設定した場合。水平と垂直の両方の枠線が表示されます。
|