Private Sub 詳細_Format(Cancel As Integer, FormatCount As Integer)
Dim strTxt As String
Dim i As Integer
Dim BoxSize As Long
Dim TxtSize As Long
Me.FontSize = 10
Me.[テキストボックス].FontSize = 10
strTxt = Me.[テキストボックス].Text
i = Me.[テキストボックス].FontSize
BoxSize = Me.[テキストボックス].Width
TxtSize = Me.TextWidth(strTxt)
Do While BoxSize < TxtSize
Me.[テキストボックス].FontSize = i - 1
Me.FontSize = i - 1
TxtSize = Me.TextWidth(strTxt)
i = i - 1
Loop
End Sub
なるほど〜