+ Reply to Thread
Results 1 to 2 of 2

Wrong number of arguments or invalid property assignment

  1. #1

    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


  2. #2
    Mark Driscol
    Guest

    Re: 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


    [email protected] 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



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1