PointsToCentimeters Method Example

This example converts a measurement of 30 points to the corresponding number of centimeters.

MsgBox PointsToCentimeters(30) & " centimeters"

This example converts the value of the variable data (a measurement in points) to centimeters, inches, lines, millimeters, or picas, depending on the value of the variable unit (a value from 1 through 5 that indicates the resulting unit of measurement).

Select Case unit
    Case 1
        result = PointsToCentimeters(data)
    Case 2
        result = PointsToInches(data)
    Case 3
        result = PointsToLines(data)
    Case 4
        result = PointsToMillimeters(data)
    Case 5
        result = PointsToPicas(data)
    Case Else
        Error 5
End Select