I'm at the stage of giving up! I just cannot see how to clear those pesky Status cells (and others). Yes there are many threads in the forum but none (duly adapted) want to work for me! I've tried them all and they refuse to clear. I'm not wanting anything fancy, I just want to clear them when Guardian/Excel move on to the next market. I'm wanting to place just 1 bet on 1 or 2 runners per market and then move on to the next.
I have a macro/subroutine (ClearCells) that works perfectly when called from the keyboard …
Code: Select all
Sub ClearCells()
'
' Clear all cells on Market Change
'
' Keyboard Shortcut: Ctrl+Shift+C
'
' ClearRunners
Range("B9:K68").Select
Selection.ClearContents
'
' ClearBetsData
Range("O9:AE68").Select
Selection.ClearContents
'
' Clear bet placement confirmations
Range("L10,L12,L14,L16,L18,L20,L22,L24,L26,L28,L30,L32,L34,L36,L38,L40,L42,L44,L46,L48,L50,L52,L54,L56,L58,L60,L62,L64,L66,L68").Select
Selection.ClearContents
End Sub
But when called from a subroutine monitoring a trigger cell (AI7) it gets 'stuck' at the first task (Range("B9:K68").Select) according to the debugger! My 'calling code' is ...
Code: Select all
Private Sub Worksheet_Calculate()
If Range("AI7") = "Clear_Cells" Then Call ClearCells
End Sub
Note: I only split the clearing into the three actions to try and help with debugging. And I know some say you only need to clear the Status column but on mine the redundant rows from an earlier race with more runners do not clear and it's is essential for my BOT calculations that they do! Anyway 'overclearing' should not do any harm, belt and braces and all that.
I would be grateful for any explanations why it's not working because I don't really want to be getting up at 03:00 just to keep manually clearing the Status and other cells.