Results 1 to 24 of 24

Copy/Paste Special Macro

Threaded View

dwnocturnal Copy/Paste Special Macro 11-12-2010, 08:36 AM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 08:41 AM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 11:27 AM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 11:29 AM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 11:44 AM
snb Re: Copy/Paste Special Macro 11-12-2010, 11:48 AM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 11:56 AM
snb Re: Copy/Paste Special Macro 11-12-2010, 12:00 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 11:58 AM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 12:23 PM
snb Re: Copy/Paste Special Macro 11-12-2010, 12:25 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 12:32 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 12:39 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 01:04 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 01:18 PM
snb Re: Copy/Paste Special Macro 11-12-2010, 01:32 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 01:51 PM
snb Re: Copy/Paste Special Macro 11-12-2010, 01:55 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 02:05 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 02:33 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 02:57 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 03:14 PM
dwnocturnal Re: Copy/Paste Special Macro 11-12-2010, 03:16 PM
JBeaucaire Re: Copy/Paste Special Macro 11-12-2010, 05:36 PM
  1. #1
    Registered User
    Join Date
    11-12-2010
    Location
    Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    11

    Post Copy/Paste Special Macro

    I have created a macro to copy data that is inserted into one workheet into a different worksheet using the pastespecial command to only insert the values. The macro also takes into account if there is already data in that column (cells in that column); if so, it then moves one column to right and checks it for data.

    My problem is this; I have had it working before (i believe when i was using 2003) but now it is not working. It appears to copy the data correctly and check the columns on the other worksheet but it never pastes the data. Also, if I try to run it more than once, I receive the ever annoying message of "Run-time error '1004': Method Range' of object '_Global' failed."

    Like I said, I've had this working before, but I wouldn't think that 2007 would cause it to not work because I had other people using 2007 run it before. Below is the macro, and yes just to confirm, there is a sheet called %s. Thanks in advance for any help.
    Sub PasteSpecial()
    
    Dim loopvar As Boolean
    Dim CELL As Integer
    Dim Cellletter As String
    
    loopvar = True
    CELL = 1
    
    Sheets("% s").Activate
    Range("A1:A49").Select
    Selection.Copy
    Sheets("Peak Statistics").Activate
    Range("A9").Activate
        Do
            
            If IsEmpty(ActiveCell.Offset(0, CELL)) Then
                loopvar = False
            Else
                CELL = CELL + 1
            End If
        Loop While (loopvar = True)
    
    CELL = CELL + 65
    Cellletter = Chr(CELL) & "9"
    Range(Cellletter).Activate
    ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    End Sub
    Last edited by dwnocturnal; 11-12-2010 at 05:45 PM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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