Quote:
Originally Posted by jade_00
If this doesn't work, if you know how, take a screenshot of the VBA code indicating the line where the code falls down - that would give me a hint as to why.
|
I put where it is highlighted from the visual basic in RED. In the Pool tab after the error in column B line 1 this is now there:
0.976727 This is followed by the other fighters names copied under neath it. If that helps any.
----
Sub AddFighter()
'
' AddFighter Macro
' Macro for adding a new fighter into TBCB. Prerequisites: - At least two fighters in Pool - At least one fighter in Active (with all applicable forumlas)
'
'
Sheets("Active").Select
Columns("F:F").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("G:G").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Sheets("Main").Select
Range("A1:B1").Select
Sheets("Active").Select
Cells.Select
Selection.Copy
Sheets("ChangeDetect").Select
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Sheets("Pool").Select
Columns("A:A").Select
Application.CutCopyMode = False
Selection.Copy
Columns("B:B").Select
ActiveSheet.Paste
Range("B1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RAND()"
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.Select
Application.CutCopyMode = False
- ActiveWorkbook.Worksheets("Pool").Sort.SortFields. Clear
ActiveWorkbook.Worksheets("Pool").Sort.SortFields. Add Key:=Range("B1:B7"), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Pool").Sort
.SetRange Range("A1:B7")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With