+ Reply to Thread
Results 1 to 21 of 21

macro copy paste

Hybrid View

  1. #1
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: macro copy paste

    Hi max_max,

    Another alternative would be:

    Sub copia_articolo() 'per copiare articolo in MATERIALI
    
    
     Application.CutCopyMode = False '<<< abilta copia/incolla
    
    '------------------------------------------------------------------------
        ActiveCell.Select
    
        Selection.Copy
        
        Sheets("Foglio1").Activate '<<< passa al foglio
    
      UltimaRiga = Range("A" & Rows.Count).End(xlUp).Row
    Cells(UltimaRiga + 1, 1).Select
    On Error Resume Next
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    '------------------------------------------------------------------------
    
     Application.CutCopyMode = False '<<< disabilta copia/incolla
     
     
    End Sub
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  2. #2
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Hello

    the changes of jaslake work

    the changes of winon not work

    a greeting and thanks.
    max

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi max

    I'll not say "Never" but it's my experience you'll not need this line in your Code...
    Application.CutCopyMode = True   '<<< abilta copia/incolla
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    You're welcome...glad I could help.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Hello.
    it is possible this macro functions only on sheet 2 - sheet 3 etc .. and not in sheet1?


    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    
     Application.CutCopyMode = False '<<< disabilta copia/incolla
    
     Application.CellDragAndDrop = False '<<< disabilita quadratino di trascinimento
          
       End Sub
    max

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Thanks jaslake.
    A control response to # 8?
    Thanks again.
    max

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi Max

    See if this works for you...
    Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
    
       If Not ActiveSheet.Name = "Foglio1" Then
          Application.CutCopyMode = False   '<<< disabilta copia/incolla
    
          Application.CellDragAndDrop = False   '<<< disabilita quadratino di trascinimento
       End If
    End Sub

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro copy paste

    Thanks jaslake.
    the new change does not work well.

    In "Foglio1" does not work
    Application.CellDragAndDrop = False

    In "Foglio1" works
    Application.CutCopyMode = False

    I attach example.
    max
    Attached Files Attached Files

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: macro copy paste

    Hi Max

    I don't understand what you're trying to accomplish.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 01-13-2016, 08:50 PM
  2. Copy paste - cute paste macro almost working
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2014, 12:33 PM
  3. Copy & paste in macro doesn't paste all cells
    By pltrapper in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2013, 09:22 AM
  4. [SOLVED] Simple copy and paste macro- Paste special help needed.
    By hernancrespo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2012, 07:02 AM
  5. [SOLVED] Macro to Find, copy, paste, find, copy, paste, find, copy, paste, u get the picture....
    By westsoldman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-12-2012, 01:12 AM
  6. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM
  7. Copy and Paste macro needs to paste to a changing cell reference
    By loulou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2005, 07:06 AM

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