Hi,
In the procedure below a compile error message “ Loop without Do” is being generated in the first Do Until Loop structure. This procedure has been working well previously. The Excel workbook is receiving real time data from an online server.
Could this be an issue with the server or Excel itself?
Any help will be much appreciated.
Thanks. Rob.
In the procedure below a compile error message “ Loop without Do” is being generated in the first Do Until Loop structure. This procedure has been working well previously. The Excel workbook is receiving real time data from an online server.
Could this be an issue with the server or Excel itself?
Code:
Sub Analyse()
Application.ScreenUpdating = False
'checks if the traded value has exceeded the Set Value
'and todays low is greater than yesterdays low
'and todays volume is greater than the previous five days
Sheets("Market Interface").Select
Range("p4").Select
Do Until IsEmpty(ActiveCell)
If Selection.Offset(0, -4).Value > Selection.Offset(0, -3).Value And _
Selection.Offset(0, 24).Value > 0 Then
Selection.Offset(0, -2).Copy Sheets("Selections").Range("b:b").Cells(Rows.Count).End(xlUp).Offset(1, 0)
Selection.Offset(1, 0).Select
Loop
'puts the time when the stock was selected into column B
Sheets("Selections").Select
Range("a9").Select
Do Until IsEmpty(Selection.Offset(0, 1).Value)
Range("a:a").Cells(Rows.Count).End(xlUp).Offset(1, 0).Select
If Not IsEmpty(Selection.Offset(0, 1)) Then Selection.Value = Now
Loop
' Range("c9").Select
'
' 'copies the code to column C in preperation to download RTD
' Do Until IsEmpty(Selection.Offset(0, -1).Value)
' Range("c:c").Cells(Rows.Count).End(xlUp).Offset(1, 0).Select
' If Not IsEmpty(Selection.Offset(0, -1)) Then Selection.Value = Range("A" & ActiveCell.Row)
' Loop
'deletes the codes that are duplicated up the list
Call Check_for_previous_occurance_of_code
End Sub
Thanks. Rob.