Теперь создадим свойство Info в котором будет содержаться текст выводимой информации.
Общий код для созданной нами формы будет выглядеть так:
Public Unit As WdMeasurementUnits
Dim Info As String
Private Sub opb_Lines_Change()
If Me.opb_Lines.Value = True Then
Me.Unit = wdPicas
End If
End Sub
Private Sub opb_UnitApplication_Change()
If Me.opb_UnitApplication.Value = True Then
Me.Unit = ThisDocument.Application.Options.MeasurementUnit
End If
End Sub
Private Sub opb_UnitCentimeters_Change()
If Me.opb_UnitCentimeters.Value = True Then
Me.Unit = wdCentimeters
End If
End Sub
Private Sub opb_UnitInches_Change()
If Me.opb_UnitInches.Value = True Then
Me.Unit = wdInches
End If
End Sub
Private Sub opb_UnitMillimeters_Change()
If Me.opb_UnitMillimeters.Value = True Then
Me.Unit = wdMillimeters
End If
End Sub
Private Sub opb_UnitPicas_Change()
If Me.opb_UnitPicas.Value = True Then
Me.Unit = wdPicas
End If
End Sub
Private Sub opb_UnitPoints_Change()
If Me.opb_UnitPoints.Value = True Then
Me.Unit = wdPoints
End If
End Sub
Public Function Value(Num As Variant) As Single
If Me.Unit = wdInches Then
Value = PointsToInches(Num)
Exit Function
ElseIf Me.Unit = wdCentimeters Then
Value = PointsToCentimeters(Num)
Exit Function
ElseIf Me.Unit = wdMillimeters Then
Value = PointsToMillimeters(Num)
Exit Function
ElseIf Me.Unit = wdPoints Then
Value = Num
Exit Function
ElseIf Me.Unit = wdPicas Then
Value = PointsToPicas(Num)
Exit Function
End If
End Function
Во вложении находится файл созданной формы
Отредактировано aap77 (17.05.2012 21:08:37)
Post's attachmentsform_ClassInfo.rar 1.85 Кб, 4 скачиваний с 2012-05-17
You don't have the permssions to download the attachments of this post.