Results 1 to 2 of 2

Copy/Paste user input info into another worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    01-12-2011
    Location
    Hartford, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Copy/Paste user input info into another worksheet

    Hi all --

    In sheet one when user enters value (a questionnaire) and hits the "Save" button: 1. It should copy the values entered and pastes its horizontally so as to create a table in Sheet 2.

    2. Then it should clear the answers for the next set of input values. And again when the Save button is hit, it should copy/paste it to the next line in Sheet 2.

    I was able to record a macro to copy/paste to the next sheet. But how do I get the next set of values to be copy/paste to next line in Sheet 2, instead of it overwriting the initial info?

    Here's what I have:

    Sub Macro2()
    '
    ' Macro2 Macro
    '
    '
       Range("B1:B3").Select
    
        Selection.Copy
    
        Sheets("Sheet2").Select
    
        Range("A2:C2").Select
    
        Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
    
            False, Transpose:=True
    
        Range("A3").Select
    
        Sheets("Sheet1").Select
    
        Range("B1:B3").Select
    
       Application.CutCopyMode = False
    
        Selection.ClearContents
    
        Range("B1").Select
    
    End Sub
    Thanks,

    Mark.
    Last edited by pike; 01-12-2011 at 09:30 PM. Reason: add code tags PM to OP

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