Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Find from Textbox and Paste into Cell on sheet one

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Find from Textbox and Paste into Cell on sheet one

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Find from Textbox and Paste into Cell on sheet one

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link a textbox on a sheet to a cell?! Webtechie Excel Discussion (Misc queries) 2 March 26th 10 04:28 PM
How can i import data from a cell in another sheet, into a textbox Hans the norwegian Excel Worksheet Functions 1 August 19th 09 01:39 PM
I need to find the first empty row in a sheet to paste data to rgbivens Excel Programming 2 April 7th 05 07:29 PM
Find range in one sheet, then paste in the other (one by one) cskgg[_6_] Excel Programming 3 August 13th 04 01:23 PM
Search, find, copy muliple cells from new sheet and paste Graham[_5_] Excel Programming 3 December 29th 03 07:38 PM


All times are GMT +1. The time now is 01:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"