Macro works in excel but not with guardian

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
lionrusso
Posts: 2
Joined: Wed Mar 03, 2010 6:39 pm

Hi,

could someone please help?

I have a macro that works fine when I open excel that basicaly clears the bet status. If I manualy write "placed" in the status cell the macro clears it, but if I put the sheet in guardian it simply won't work.

this is the code I'm using:
already tried it with calculate and with change. it works both ways manualy but not when betangel fires the bet..

Can you help?

Thanks,

Miguel

Private Sub Worksheet_Change(ByVal Target As Range)
Dim bSuccess As Boolean

On Error Resume Next
bSuccess = Range("ai4").GoalSeek(0.6, Range("Ag2"))
On Error GoTo 0
If Not bSuccess Then
MsgBox "Goal Seek Failed for Cell ""ag2""!"
End If

Dim i As Integer
For i = 9 To 67 Step 2
If Range("O" & i).Value = "placed" Then _
Range("O" & i).ClearContents

Next i


If Range("H1").Value = "Suspended" Then
For i = 9 To 67 Step 2
If Range("O" & i).Value = "placed" Then _
Range("O" & i).ClearContents
Next i
End If


End Sub
Dogmatic
Posts: 34
Joined: Fri Apr 17, 2009 11:05 am

Comparisons in VBA are case sensitive, so you need to specify:

If Range("O" & i).Value = "PLACED" Then
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”