Sub sample()
Dim inputcm As Double
inputcm = Application.InputBox("㎝単位で入力してください", Type:=1)
MsgBox inputcm & "cm は" & Application.CentimetersToPoints(inputcm) & "ポイントです。"
End Sub
point→cmのコード
続いてpoint→cmのコードです(^^♪
正確に言うとcm→point→cmですが(;^ω^)まぁ参考程度に。
Sub sample()
Dim inputcm As Double
inputcm = Application.InputBox("㎝単位で入力してください", Type:=1)
pointcm = Round(Application.CentimetersToPoints(inputcm) / Application.CentimetersToPoints(1), 10)
MsgBox Application.CentimetersToPoints(inputcm) & "ポイントは" & pointcm & "㎝です"
End Sub
コメントを残す