ポイント単位の値に変換(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 …
-
-
取り消し線を設定する(Strikethrough プロパティ)
取り消し線を設定する(Strikethrough プロパティ) Striketh …
-
-
指定した数値を文字列に変換する(Str 関数)
Str 関数 の使い方 Str 関数は、数値・数式を文字列に変換して返す関数です …
-
-
引数の整数部分を取得する(Fix 関数・Int 関数)
Fix 関数・Int 関数の使い方 【書式】 number_fix = Fix …
-
-
XlThemeColor 列挙型
XlThemeColor 列挙 定数 値 内容 xlThemeColorDark …
-
-
カレントフォルダの取得・設定(DefaultFilePath プロパティ)
DefaultFilePath プロパティ カレントフォルダとは、ブックを開いた …
-
-
日付時刻:日付時刻データを計算( DateAdd 関数 )
DateAdd 関数(日付・時刻の値を加算・減算結果を取得) 【書式】 resu …
-
-
文字列:指定した文字の文字コードを取得する(Asc 関数)
Asc 関数 【書式】 result = Asc ( string ) 引数・戻 …
-
-
インプットボックスを表示する(InputBox関数・InputBoxメソッド)
「InputBox関数」と「InputBoxメソッド」の違い 「InputBox …
-
-
コレクション(Collection)オブジェクト「連想配列」
コレクション(Collection)オブジェクトの使い方 【書式】 Dim my …
