Hello,
could you please someone help me with this macro?
It is working great in Excel 2003, but generated error in 2007: runtime error 1004 paste method of worksheet class failed with highlighted line Activesheet.paste (red marked).
Range("A5").Select
Selection.End(xlDown).Select
'Range("F252").Select
activerow = ActiveCell.Row + 3
Dim position As Double
position = activerow * 12.75
position = position + 8.25
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 198#, position, _
313.5, 63.75).Select
Selection.Characters.Text = "Signature"
With Selection.Characters(Start:=1, Length:=26).Font
.Name = "Arial"
.FontStyle = "Standaard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
'Range("F252").Select
'ActiveSheet.Shapes("Text Box 1").Select
'Selection.Characters.Text = "Signature"
'With Selection.Characters(Start:=1, Length:=26).Font
' .Name = "Arial"
' .FontStyle = "Standaard"
' .Size = 10
' .Strikethrough = False
' .Superscript = False
' .Subscript = False
' .OutlineFont = False
' .Shadow = False
' .Underline = xlUnderlineStyleNone
' .ColorIndex = xlAutomatic
'End With
Selection.Copy
activeRange = "H" & activerow + 1
Range(activeRange).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll ToRight:=6
Selection.ShapeRange.IncrementLeft 180#
Selection.ShapeRange.IncrementTop 0.75
'ActiveSheet.Shapes("Text Box 2").Select
Selection.Characters.Text = _
"Signature"
With Selection.Characters(Start:=1, Length:=62).Font
.Name = "Arial"
.FontStyle = "Standaard"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.ShapeRange.ScaleWidth 1.3, msoFalse, msoScaleFromTopLeft
Range("H139").Select
Any ideas, what can be wrong?
Konik
Bookmarks