ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Wrong number of arguments or invalid property assignment (https://www.excelbanter.com/excel-programming/365518-wrong-number-arguments-invalid-property-assignment.html)

[email protected]

Wrong number of arguments or invalid property assignment
 
I see There are a couple like these and eah one has a different answer.
Everytime It gets to Range it falls over, it does this with all macros
that i have recorded that use a referrance to range. Any suggestions?

Sub tidypasting()
'
' tidypasting Macro
' Cut unneccesary columns from Upgrades productivity
'

'
ActiveCell.Offset(0, 1).Columns("A:C").EntireColumn.Select
ActiveCell.Offset(1, 3).Range("A1").Activate
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(-1, -3).Range("A1:B1").Select
Selection.Delete Shift:=xlUp
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.SmallScroll ToRight:=-9
ActiveWindow.SmallScroll Down:=-140
ActiveCell.Offset(0, -9).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveSheet.Paste
End Sub


Mark Driscol[_2_]

Wrong number of arguments or invalid property assignment
 
Can you be more specific about what you are trying to accomplish? That
is, whatever the ActiveCell is, delete the column or cell that is x
rows down and y rows to the right, etc. Also, when you say it fails at
the "Range", which statement is that? There are several statements
below that reference Ranges.

Mark


wrote:
I see There are a couple like these and eah one has a different answer.
Everytime It gets to Range it falls over, it does this with all macros
that i have recorded that use a referrance to range. Any suggestions?

Sub tidypasting()
'
' tidypasting Macro
' Cut unneccesary columns from Upgrades productivity
'

'
ActiveCell.Offset(0, 1).Columns("A:C").EntireColumn.Select
ActiveCell.Offset(1, 3).Range("A1").Activate
Selection.Delete Shift:=xlToLeft
ActiveCell.Offset(-1, -3).Range("A1:B1").Select
Selection.Delete Shift:=xlUp
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.SmallScroll ToRight:=-9
ActiveWindow.SmallScroll Down:=-140
ActiveCell.Offset(0, -9).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveSheet.Paste
End Sub




All times are GMT +1. The time now is 08:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com