Date: Tue, 3 Feb 2004 19:38:03 -0800
Reply-To: NetComm888 <netcomm888@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: NetComm888 <netcomm888@YAHOO.COM>
Organization: http://groups.google.com
Subject: Microsoft Excel Macro help!!!!!!
Content-Type: text/plain; charset=ISO-8859-1
I know this is not the board for Excel. But since people here are very
knowledgeble and helpful, i wanna give it a shot
I want to assign macro to a command button called "Enter". When I
first click that button, it is supposed to copy the 2nd row of a
spreadsheet called "stage" into the 2nd row of another spreadsheet
called "tblDemo". The 2nd row of "stage" will be dynamtically changed
from time to time. So everytime when you click "Enter", it is supposed
to copy the 2nd row of "stage" into the next row of "tblDemo". I'm
really not
good at writing macro in Excel. I used "record" to compile the
following codes.
But it will only copy into the same row of "tblDemo". So how
should I change the following codes to achieve the goal?
Sub Enter_Click()
Sheets("tblDemo").Select
Range("A3").Select
Sheets("stage").Select
Rows("2:2").Select
Selection.Copy
Sheets("tblDemo").Select
ActiveSheet.Paste
Sheets("stage").Select
Application.CutCopyMode = False
End Sub
|