• Copy Paste (2000)

    Author
    Topic
    #401607

    I have run into a snag in running the following macro:
    Sub CopyPasteSpecial()
    Application.ScreenUpdating = False
    Range(“A3:A61”).Select ‘(The range I

    Viewing 2 reply threads
    Author
    Replies
    • #792308

      All of this can be shortened to:

      Sub CopyPasteSpecial()
      Dim oSource as range
      Dim oTarget as range
      Application.ScreenUpdating = False
      Set oSource=Range(“A3:A61”) ‘(The range I

    • #792309

      All of this can be shortened to:

      Sub CopyPasteSpecial()
      Dim oSource as range
      Dim oTarget as range
      Application.ScreenUpdating = False
      Set oSource=Range(“A3:A61”) ‘(The range I

    • #792314

      You’ll run into problems is column B is still empty – your code will move to th elast cell in column B (B65536) and then try to move one row down, which is impossible. Try the following modified and shortened version:

      Sub CopyPasteSpecial()
      Application.ScreenUpdating = False
      Range(“A3:A61″).Copy
      Workbooks.Open Filename:=”C:My DocumentsSpecialHandicaps.xls” ‘(The file I

      • #792323

        Hans,
        Thank you for your immediate reply. The only problem is the macro stops at:
        Sheets(“Scores”).Range(“B66536”).End(xlUp).Offset(1, 0).PasteSpecial _
        xlValues
        Any idea why?
        Thanks

        • #792327

          No, I tried it out on a test workbook and it worked OK. What is the error message you get?

          • #792335

            Hans & Jan
            IInstead of: Sheets(“Scores”).Range(“B66536”).End(xlUp).Offset(1, 0).PasteSpecial xlValues
            on 1 line I used: Sheets(“Scores”).select
            Range(“B65536”).End(xlUp).Offset(1, 0).Select
            Selection.PasteSpecial xlValues
            This seems to work but I don’t know why

            At any rate, you guys got me aimed in the right direction.
            Thanks tons!
            clapping clapping clapping clapping

          • #792336

            Hans & Jan
            IInstead of: Sheets(“Scores”).Range(“B66536”).End(xlUp).Offset(1, 0).PasteSpecial xlValues
            on 1 line I used: Sheets(“Scores”).select
            Range(“B65536”).End(xlUp).Offset(1, 0).Select
            Selection.PasteSpecial xlValues
            This seems to work but I don’t know why

            At any rate, you guys got me aimed in the right direction.
            Thanks tons!
            clapping clapping clapping clapping

        • #792328

          No, I tried it out on a test workbook and it worked OK. What is the error message you get?

        • #792329

          Maybe the clipboard got emptied so there is nothing to paste?

          Try issuing the copy command after the workbooks.Open statement.

        • #792330

          Maybe the clipboard got emptied so there is nothing to paste?

          Try issuing the copy command after the workbooks.Open statement.

      • #792324

        Hans,
        Thank you for your immediate reply. The only problem is the macro stops at:
        Sheets(“Scores”).Range(“B66536”).End(xlUp).Offset(1, 0).PasteSpecial _
        xlValues
        Any idea why?
        Thanks

    Viewing 2 reply threads
    Reply To: Copy Paste (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: