R
Rene
Goodmorning (for me),
For a weekly presentation I am making a vba routine to
use teamresults, on slide A in an Excel object, to
create a final result in an Excel object on slide B.
the problem I am finding is as followes and is taking
place in the Excel object on slide B
I can't seem to find the way to copy a selection, say
range("C20:J30") to a range starting in cell("B3"). The
next thing is that I think the sorting will also not
work becouse of selection problems. The code I use is
as shown at the end. Hop somebody can help me finish
this. This is my last part of the total routine..
thanks in advance, Rene van Kwawegen, NL
*********** code snippet ******************
Sub KopieEnSorteer()
Set ExWkbk =
ActivePresentation.Slides("slide20").Shapes("Object
3").OLEFormat.Object
Set Stand = ExWkbk.Worksheets(1)
Stand.Range("B20:J30").Copy
======= it works up til this line, the next line is the
biggest problem and the sorting is not jet tried =====
Stand.Range ("B3")
Stand.Application.Selection.PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Stand.Application.CutCopyMode = False
Selection.Sort Key1:=Range("D3"), Order1:=xlDescending,
Key2:=Range("K3"), Order2:=xlDescending, _
Key3:=Range("I3"), Order3:=xlDescending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False,
Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
Stand.Range("A2").Select
End Sub
*********** end code *******************
For a weekly presentation I am making a vba routine to
use teamresults, on slide A in an Excel object, to
create a final result in an Excel object on slide B.
the problem I am finding is as followes and is taking
place in the Excel object on slide B
I can't seem to find the way to copy a selection, say
range("C20:J30") to a range starting in cell("B3"). The
next thing is that I think the sorting will also not
work becouse of selection problems. The code I use is
as shown at the end. Hop somebody can help me finish
this. This is my last part of the total routine..
thanks in advance, Rene van Kwawegen, NL
*********** code snippet ******************
Sub KopieEnSorteer()
Set ExWkbk =
ActivePresentation.Slides("slide20").Shapes("Object
3").OLEFormat.Object
Set Stand = ExWkbk.Worksheets(1)
Stand.Range("B20:J30").Copy
======= it works up til this line, the next line is the
biggest problem and the sorting is not jet tried =====
Stand.Range ("B3")
Stand.Application.Selection.PasteSpecial
Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Stand.Application.CutCopyMode = False
Selection.Sort Key1:=Range("D3"), Order1:=xlDescending,
Key2:=Range("K3"), Order2:=xlDescending, _
Key3:=Range("I3"), Order3:=xlDescending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False,
Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
Stand.Range("A2").Select
End Sub
*********** end code *******************