OZmium Sports Betting and Horse Racing Forums

OZmium Sports Betting and Horse Racing Forums (http://forums.ozmium.com.au/index.php)
-   General Topics (http://forums.ozmium.com.au/forumdisplay.php?f=59)
-   -   Help with excel (http://forums.ozmium.com.au/showthread.php?t=21989)

bookend 2nd July 2011 10:18 AM

Help with excel
 
1 Attachment(s)
Hi I'm having some problems with a excel program (method 260). It was working ok yesterday, now a message pops up when I try to run the macros "Run time error '9': Subscript out of range. I'm only still learning excel so any help would be appreciated. This sheet was originally posted here quite some time ago.
Below is the highlighted area when debugged;

End If
If Sheets("Horse").Cells(A, B) <> vbNullString Then
Races(C) = Sheets("Horse").Cells(A, 1) & Sheets("Horse").Cells(X - 1, B).Text
Time(C) = Sheets("Horse").Cells(A, B)
C = C + 1

Cheers Bookend

moeee 2nd July 2011 01:39 PM

There is a statement in the Definitions.

Global Time(1 To 100) As Variant

And your Time() has reached 101 so it messages you have gone over the range assigned, which is 100.

I have no idea , but I think this may mean the Program is restricted to 100 Races.

Did you ever run this program when there were more than 100 Races on the day?
You possibly have so there goes my thoughts :(

moeee 2nd July 2011 01:53 PM

Try this.
It worked for me.

Go into the Macro's and clicl on edit.
Then click on the Declarations Tab.

Where it says Races (100) , change it to 200
And where it says Time (100) , change it to 200

Then save the Program as "Method 260 Modified".

I think that will get you by until Shaun or Woof43 or Kennedy91210 rolls up.

bookend 2nd July 2011 01:55 PM

Hi Moeee. Your probably right regarding going over the limit of races. I tried something different and it's working again. After opening macros with 'Alt & F8
I selected "method 260", then in the dropdown box below "open all work books"
I changed it to "method_260" and clicked run. I've been getting some good results with this so it maybe worth testing further.

Cheers

Bookend

moeee 2nd July 2011 02:05 PM

Nice work bookend.

Ignore everything I suggested.

The only thing my idea did was get past the stumbling block , but it didn't run correctly at all.
Times and dates were totally wrong.

bookend 2nd July 2011 02:14 PM

Quote:
Originally Posted by moeee
Try this.
It worked for me.

Go into the Macro's and clicl on edit.
Then click on the Declarations Tab.

Where it says Races (100) , change it to 200
And where it says Time (100) , change it to 200

Then save the Program as "Method 260 Modified".

I think that will get you by until Shaun or Woof43 or Kennedy91210 rolls up.


Thanks Moeee. Got it.

Robot 2nd July 2011 08:19 PM

ROBOT
 
Hi Bookend.I have had the same problems and then lost the program be it my own fault. Thanks for re posting it.Like you i am new to this way of betting and have a few questions to ask you.Would you please e mail bailyhoo at yahoo dot com dot au. Looking forward to meeting you .Regards ROBOT


All times are GMT +10. The time now is 04:02 PM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.