|
-
Jan 26th, 2009, 10:45 AM
#1
Thread Starter
New Member
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
-
Jan 26th, 2009, 11:28 AM
#2
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
-
Jan 26th, 2009, 11:43 AM
#3
Thread Starter
New Member
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
-
Jan 26th, 2009, 11:52 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|