Results 1 to 4 of 4

Thread: vba question

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    2

    vba question

    I have an excell workbook that I am looking to copy data from cell "A1" in sheet1 to a new cell in row "A" in sheet2 on a commandbutton_click. can anyone show me the method or best way to accomplish this. I am affraid that I have not had a formal class in vba so any help would be apreciated.

    using excel 2007

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: vba question

    Welcome to the forums.

    Here is an example. Modify as needed.
    Code:
    Private Sub CommandButton1_Click()
    Sheets("Sheet2").Range("A10").Value = Sheets("Sheet1").Range("A1").Value
    End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2009
    Posts
    2

    Re: vba question

    Thank you for your help however I am looling to add a new recordset in "sheet2". basicly I want the data in "sheet1 A1" moved into a new row in collomn A in sheet2

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: vba question

    Ok...so specify the from where and the to where.

    There is no recordset involved here. It is simply copying a number from one place to another.

    If you want to "move" it, then after the copy, delete it from sheet1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width