Dim t As Single '経過時間測定用 t = Timer Dim n As Integer MSHFlexGrid1.Redraw = False For n = 1 To Limit 'MSHFlexGrid1.TextMatrix(n, 0) = CStr(n) & "行目" & vbCrLf '★間違い MSHFlexGrid1.TextMatrix(n, 0) = CStr(n) & "行目" Next MSHFlexGrid1.Redraw = True Debug.Print FormatNumber(Timer - t, 4) & "秒" MsgBox FormatNumber(Timer - t, 4) & "秒", vbInformation
S = "abcdefghij" Mid(S, 4, 3) = "XYZ" Debug.Print S '「abcXYZghij」になる。