by bolpx001 » Sun Apr 26, 2020 2:36 pm
Hi All in these crazy crazy times, I am hoping somebody can offer some assistance help with an issue I have. I have written a VBA routine to place two bets on a horse using the COM facilities of BA The routine lives in the VBA module of a sheet I called Refresh and depends on the Worksheet Change event. The Routine works very well and I am very pleased with it but now I want to move it into another module and incorporate it into my betting routines.
My reason for wanting to do this is because every time I try to read or write to another sheet I get a run-time error which makes it very difficult to incorporate it into my normal betting routines. Also I don’t want the routine triggering every time the Refresh sheet is updated.
The error I got when I tried to move the routine was Compile Error Only valid in object Module. Can somebody please throw some light on this for me.
Many thanks - Paul