ポイント単位の値に変換(CentimetersToPoints,InchesToPoints)
2015/10/08
CentimetersToPoints メソッド
センチメートル単位の値をポイント単位の値に変換します。戻り値は、倍精度浮動小数点型(Double)の値です。
object.CentimetersToPoints ( centimeters )
引数・戻り値
- object ・・・ Application オブジェクト を指定します。
- centimeters ・・・ センチメートル単位の数値(倍精度浮動小数点型:Double)を指定します。省略不可。
InchesToPoints メソッド
インチ単位の値をポイント単位の値に変換します。戻り値は、倍精度浮動小数点型(Double)の値です。
object.InchesToPoints ( inches )
引数・戻り値
- object ・・・ Application オブジェクト を指定します。
- inches ・・・ インチ単位の数値(倍精度浮動小数点型:Double)を指定します。省略不可。
CentimetersToPoints メソッド,InchesToPoints メソッド 使用例
サンプルVBAソース
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Sub Sample_Point() '「1センチメートル」をポイント単位に変換(Round 関数で小数点以下2桁まで表示) Debug.Print Round(Application.CentimetersToPoints(1), 2) '「0.5インチ」をポイント単位に変換 Debug.Print Application.InchesToPoints(0.5) '「50ポイント」をセンチメートル単位に変換(Round 関数で小数点以下2桁まで表示) Debug.Print Round(100 / Application.CentimetersToPoints(1), 2) End Sub |
実行結果
関連記事
-
-
文字列:文字列の一部を別の文字列で置換(Replace 関数)
Replace 関数の使い方 【書式】 result = Replace ( s …
-
-
データ型変換関数
データ型変換関数の使い方 【書式】 function ( expression …
-
-
CPU に制御を移す(DoEvents 関数)
DoEvents 関数 DoEvents 関数を実行すると、CPU に制御を移し …
-
-
文字列:文字列の空白を削除(Trim 関数, LTrim関数, RTrim関数)
Trim 関数・LTrim 関数・RTrim 関数の使い方 【書式】 <先頭と末 …
-
-
変数が日付型かどうかをチェックする( IsDate 関数 )
IsDate 関数の使い方 【書式】 result = IsDate( expr …
-
-
Math 関数( Abs,Atn,Cos,Exp,Log,Rnd,Sgn,Sin,Sqr,Tan )
Abs 関数 【書式】 value = Abs ( number ) 【引数・戻 …
-
-
連想配列(Dictionary オブジェクト)
連想配列 連想配列とは、添字(キー)に文字列を使用することができる配列です。 V …
-
-
色の設定(Color プロパティ・RGB 関数)
Color プロパティ Color プロパティは、指定したオブジェクトの色を取得 …
-
-
xlFileFormat 列挙型
xlFileFormat 列挙型 Workbook.SaveAs メソッド の引 …
-
-
引数の整数部分を取得する(Fix 関数・Int 関数)
Fix 関数・Int 関数の使い方 【書式】 number_fix = Fix …