0
ループに詰まっており、引き続き値を取得できません。このコードは最初の値を引き出し、ループを維持します。なぜこのコードはループし続けますか?
Sub createpbp()
Dim iRows As Integer
Dim i As Integer 'webtext row counter
Dim iR As Integer
Dim iPr As Integer 'row counter for pbp worksheet
Dim wksWT As Worksheet
iPr = 1
Set wksWT = Worksheets("Webtext") 'creating a variable for the text pulled from website
wksWT.Activate 'activate the webtext sheet
iRows = wksWT.UsedRange.rows.Count 'counts rows in the play by play
For i = 1 To iRows 'row 1 to end of rows
If Cells(i, 1) = "Play By Play Innings" Then 'if the cell value says play by play innings
Do Until Cells(i, 1) = "Runs" 'continue doing the following until reach end of inning
Cells(i, 1).Copy 'copy the value of the first event in inning
Sheets("Play by Play text").Select 'open up new worksheet
If Cells(iPr, 1) = Null Then
Cells(iPr, 1).Paste
Else
iPr = iPr + 1
End If
Loop
End If
Next i
セル(i、1)= "実行" ...セル(i、1)<"実行"の場合は、このループ内の何もiを変更していないので、このループは永久に実行されます – oortCloud