|
▼Jaka さん:
返事ありがとうございます。
プログレスバーをやりたいのではなく
Sub 消去月曜()動作中に
同時に命令が出せないかなと思ったのですが
できませんか?
ちなみに下記モジュールの動作時間は設定できるのでしょうか
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'***********************************************************
Sub テロップ流_セル版()
Dim St1 As String, SP1 As String, Tx1 As String, Flg As Boolean
Dim DefoFntIdx As Long, Defocol As Double, i As Long
Dim MAd As String
MAd = "G6"
St1 = "計算中!!"
SP1 = StrConv(Space(4), vbWide) '間隔
'文字を1回1回ループさせようと思ったが、最初に作っておくのが簡単。
For i = 1 To 6
Tx1 = Tx1 & St1 & SP1
Next
Tx1 = Tx1 & StrConv(Space(Int(Len(St1) \ 2)), vbWide)
With Range(MAd)
.Value = ""
If .Column > 1 Then
If .Offset(, -1).Formula = "" Then
.Offset(, -1).Value = Space(1)
Flg = True
End If
End If
DefoFntIdx = .Font.ColorIndex
Defocol = .ColumnWidth
With .Font
.ColorIndex = 2
.Name = "HG正楷書体-PRO"
'.FontStyle = "メディウム 太字 斜体" 'PCによって無い。2002
.Size = 14
.Bold = True
.Italic = True
End With
.HorizontalAlignment = xlRight
.Value = StrConv(Right(St1, Len(St1) - 4), vbWide)
.Columns.AutoFit
FitCol = .ColumnWidth
.ColumnWidth = FitCol
.Value = ""
.Font.ColorIndex = 5 '3
For i = 1 To Len(Tx1)
.Value = .Value & Mid(Tx1, i, 1)
Sleep 20 '200
Next
.ColumnWidth = Defocol
.Font.ColorIndex = DefoFntIdx
'.ClearContents
If Flg Then
.Offset(, -1).ClearContents
End If
End With
End Sub
|
|