|I am trying to create a macro to copy and paste data from a row selected from another macro and paste it into a new Worksheet. |
I have a spreadsheet of clients. Each row is a different client and the columns are defined by advertiser code, name, address, etc etc. I setup a macro search form to find an advertiser by its code and looking to then have a macro button once they find the advertiser they are looking for to copy the information from that row over to a new spreadsheet so i can have them fill out a work order for that client using their existing information.
The advertise list sheet is "AI" and the potential Work Order Sheet is "PWO".
This is the code I have for the lookup button
Private Sub CommandButton1_Click()
Dim MyText As String
Dim MyMsg As String
Dim MyTitle As String
MyText = TextBox1.Value
MyMsg = "No matches were found."
MyType = vbOKOnly + vbExclamation
MyTitle = "No Matches"
On Error GoTo ErrorHandler
Cells.Find(What:=MyText, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MsgBox MyMsg, MyType, MyTitle
Any help at all would be greatly appreciated!!