Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Incomplete Macro (Excel 2002)

    Hi
    This macro works fine except on completion it still leaves the cell selected ie the little ants running round. can anyone advise how to edit it, so that it just pastes and completes.

    Sub CopyItem()
    '
    ' CopyItem Macro
    '

    '
    ActiveCell.FormulaR1C1 = "=R3C2"
    Selection.Copy
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    End Sub

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Incomplete Macro (Excel 2002)

    Add the line (after the paste special)

    <pre>Application.CutCopyMode = False</pre>


    You could also use:
    <pre>With ActiveCell
    .FormulaR1C1 = "=R3C2"
    .Value = .Value
    End With</pre>


    To not select and not use copy/paste at all.

    Steve

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Incomplete Macro (Excel 2002)

    Hi Steve

    Your new macro is exellent, works perfectly thanks very much.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

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