i am attempting to make a betting sheet to calculate the returns of betting combinations. in particular the 'super heinz'. Have looked online for about 6 hours for a pre made one to no avail. want to be able to edit in progress so if i lose a leg i can recalculate my return.
The problem that i'm having is that i want the final return value returned to my first sheet. I am running 'list permutation' macro that generates my values to a new worksheet. Each time i run the macro the worksheet number goes up (worksheet 18, worksheet 19, etc). so when i attempt to run the macro, it runs into the wall of trying to pull a value from a sheet that doesn't exist because the number has been superseeded.
I want to be able to click the sheet, rename it and then pull the figure from that correct sheet. I have 8 sheets that i need to generate values on. Is there a way of getting the macro to follow "worksheet 1$"? This is what i've tried and its moved to a new error but this error is before the sheet change problem.
This is the new error coming up after the error box says "cant execute code in break mode":
ActiveCell.FormulaR1C1 = "=SUM(R[-4]C[-2]:R[3]C[-2])"
This is the first phase of the macro i'm trying to get to run:
This is my first post in this forum but i found the list permutation sub here so heaps of thanks already!!!!!
PS.
I screwed up my save and lost the macro. I have just re-pasted the code back into VBA but now its coming up with data error. nothing has changed from yesterday except that the macro is now called "sheet11.ListPermutations"
I think i'll fiddle with it and see what happens
Cheers
PPS.
new problem the above data error is no longer happening but i am now getting Compile Error: Sub or Function not defined.
The entire code is below and the error highlighted
Bookmarks