Results 1 to 3 of 3

Copying Cells to Another Sheet

Threaded View

thingssocomplex Copying Cells to Another Sheet 01-04-2011, 11:55 AM
snb Re: Copying Cells to Another... 01-04-2011, 12:02 PM
thingssocomplex Re: Copying Cells to Another... 01-04-2011, 12:31 PM
  1. #1
    Registered User
    Join Date
    01-02-2011
    Location
    Manchester
    MS-Off Ver
    Excel 2010
    Posts
    31

    Copying Cells to Another Sheet

    I am struggling with the VBA Code never done anything like this before I want to copy the content of 3 cells E3,E5,E13 to another worksheet named "PaymentHistory" it is all going wrong. I want the copied cells to appear in the "PaymentHistory" Sheet as follows

    E3 to A2
    E5 to B2
    E15 to B2

    I also need an offset so that when the button is clicked again the data is stored in a new row in PaymentHistory and not overwrite existing data

    I have the below code so far it copies the data but places it randomly - I also need it to paste values I don't want the formatting copied.

    Private Sub CommandButton3_Click()
    Range("E3", "E5", "E15").Select
    Selection.Copy
    Sheets("PaymentHistory").Select
    ActiveCell.Offset(1, 0).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    
    End Sub
    Last edited by DonkeyOte; 01-04-2011 at 12:05 PM. Reason: CODE rather than QUOTE tags - cheers

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