Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need hellp finding data entered in a textbox, and I want to paste the
entire row in sheet1, example: Form textbox = dog, Click Fiind a10 = cat, b10 = dog, c10 = monkey paste all cells in ss # 1. Thanks for your help -mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark,
I think this should give you something to work with. I used the following: Form called "frmFind" Button called "cmdFind" TextBox called "txtFind" Hope it helps. Regards, James Private Sub cmdFind_Click() FindText End Sub Sub FindText() Dim wkb As Workbook Dim wks1 As Worksheet Dim wks2 As Worksheet Dim rng As Range Dim rngSearch As Range Set wkb = ThisWorkbook Set wks1 = wkb.Worksheets("Sheet1") Set wks2 = wkb.Worksheets("Sheet2") Application.ScreenUpdating = False wks2.Select Set rngSearch = wks2.Range(Cells(10, 1), _ Cells(10, wks2.Range("IV10").End(xlToLeft).Column)) For Each rng In rngSearch If UCase(rng.Value) = UCase(frmFind.txtFind.Value) Then rng.EntireRow.Copy wks1.Select wks1.Range("A1").PasteSpecial (xlPasteAll) wks1.Range("A1").Select Application.CutCopyMode = False Exit For End If Next rng Application.ScreenUpdating = True Set wks1 = Nothing Set wks2 = Nothing Set wkb = Nothing MsgBox "DONE" End Sub "Mark Cover" wrote: I need hellp finding data entered in a textbox, and I want to paste the entire row in sheet1, example: Form textbox = dog, Click Fiind a10 = cat, b10 = dog, c10 = monkey paste all cells in ss # 1. Thanks for your help -mark |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Josh, Great reply but this is not working for me. I have tried to play with
it but i am not getting anything to past in sheet1. If you or someone else can give more info i would appreciate it. Thanks -mark "JS2004R6" wrote: Hi Mark, I think this should give you something to work with. I used the following: Form called "frmFind" Button called "cmdFind" TextBox called "txtFind" Hope it helps. Regards, James Private Sub cmdFind_Click() FindText End Sub Sub FindText() Dim wkb As Workbook Dim wks1 As Worksheet Dim wks2 As Worksheet Dim rng As Range Dim rngSearch As Range Set wkb = ThisWorkbook Set wks1 = wkb.Worksheets("Sheet1") Set wks2 = wkb.Worksheets("Sheet2") Application.ScreenUpdating = False wks2.Select Set rngSearch = wks2.Range(Cells(10, 1), _ Cells(10, wks2.Range("IV10").End(xlToLeft).Column)) For Each rng In rngSearch If UCase(rng.Value) = UCase(frmFind.txtFind.Value) Then rng.EntireRow.Copy wks1.Select wks1.Range("A1").PasteSpecial (xlPasteAll) wks1.Range("A1").Select Application.CutCopyMode = False Exit For End If Next rng Application.ScreenUpdating = True Set wks1 = Nothing Set wks2 = Nothing Set wkb = Nothing MsgBox "DONE" End Sub "Mark Cover" wrote: I need hellp finding data entered in a textbox, and I want to paste the entire row in sheet1, example: Form textbox = dog, Click Fiind a10 = cat, b10 = dog, c10 = monkey paste all cells in ss # 1. Thanks for your help -mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Link a textbox on a sheet to a cell?! | Excel Discussion (Misc queries) | |||
How can i import data from a cell in another sheet, into a textbox | Excel Worksheet Functions | |||
I need to find the first empty row in a sheet to paste data to | Excel Programming | |||
Find range in one sheet, then paste in the other (one by one) | Excel Programming | |||
Search, find, copy muliple cells from new sheet and paste | Excel Programming |