by alfaman » Sun Aug 17, 2014 5:20 pm
I am trying to make a sheet with all MyBets on it. I thought I would use VBA to copy them from the "MyBets" sheet for each event and append them to a growing list on another tab.
I copied a bit of VBA I use in a marco for another purpose, which works fine, and add it to the working bit of script that I already have. I know am not good with VBA and I know this is very "clunky" but the method works on the other sheet with no problems.
I get a "Select method of range class failed at the second line.
The code I am usgin is:
Sheets(MyBets).select
Range("A2").Select
If Range("A2").value = "" then Goto Line2 'if there are no bets jump into the rest of the script
Range("A2:F2").select 'select the first line of bets
Range(Selection.Selection.End(xlDown)).select 'to select the whoe range of bets
Selection.copy
Sheets("Cumulative MyBets").select
Range("A1048576").select 'to go to the bottom left cell
Slection.End(xlUP).select 'to move up to the last appended bet
ActiveCell.Offset(1,0) 'to mover to the next blank row
Active.Sheet.Paste
Line2:
.
.
(PS - there could be typos in this as I have not copied it from the code but re-typed it, as it is on another laptop.)
Help please!
Alfaman