|
よろしくお願いします。
下記コードに於いて実行中であることが
解るようにたとえばコマンドボタンの表示を実行中は
(実行中)などの表示に変えることはできますか。
約50〜60秒終了までに要するため
Private Sub CommandButton1_Click()
Dim i As Long, k As Long
Dim mySource As Worksheet
Dim myRange As Range, c As Range
Dim s1 As String
Dim s2 As String
'Dim i As Long
Dim j As Long
Dim v As Variant
ActiveSheet.Unprotect
Application.ScreenUpdating = False
v = Array("C3", "G3", "N3", "S3", "V3")
j = 8
For i = LBound(v) To UBound(v)
Worksheets("支払入力").Range(v(i)).Resize(20).Formula _
= "=LEFTB(発注先!$B" & j & ",6)" & _
" & "" "" & 発注先!$J" & j & ""
j = j + 20
Next
Range("C28,C3:D22,G3:J22,N3:O22,S3:S22,V3:W22").Select
Selection.Font.ColorIndex = 10
Range("C3").Select
Set mySource = Worksheets("発注先")
Set myRange = Range("C3:C22,G3:G22,N3:N22,S3:S22,V3:V22")
k = 0
For Each c In myRange
With c
k = k + 1
s1 = mySource.Cells(7 + k, 2).Value
s2 = mySource.Cells(7 + k, 10).Value
.Value = StrConv(LeftB(StrConv(s1, vbFromUnicode), 6), vbUnicode) & " " & s2
i = InStr(.Text, " ")
If i Then
.Characters(i).Font.Color = vbBlue
End If
End With
Next
Application.ScreenUpdating = True
Call 保護8
End Sub
|
|