With Forms!フォームプロパティの例
Debug.Print .Name
Debug.Print .Caption
Debug.Print .Section("詳細").BackColor
Debug.Print .InsideHeight
Debug.Print .InsideWidth
Debug.Print .AllowEdits
With !データ
Debug.Print .Value
Debug.Print .FontName
Debug.Print .FontSize
Debug.Print .FontBold
End With
End With
- このプログラムでは、Withステートメントのネストに注意してください。複数のWithがネストされている場合、下位のWithは上位のWithの設定を引継ぐ形になります。上記プログラムの場合、「With
!データ ~ End With」内では、「Forms!プロパティの例!データ」というオブジェクトの各プロパティを扱っていることになります。
|