Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
spreadsheet control in userform
Hi, I have used a microsoft office spreadsheet 11.0 control in my userform.. All i need is a search from the active sheet, column search, then extract the matching cell row and paste the entire row in the spreadsheet control.
How can I do it. Please give me the code. for multiple results, the sheet shud have all the matching results row in the control. thanks EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
spreadsheet control in userform
You will need to tweek this one to your needs.
BTW... at "rngFound.Offset(0, 1).PasteSpecial xlValues" the row is offset to be pasted one column over Sub FindCopyPaste() Dim myFind As Integer Dim rng As Range Dim rngToSearch As Range Dim rngFound As Range Set wks = ActiveSheet Set rngToSearch = Worksheets("NameOfWorksheetToSearch").Range("Searc hThisRange") Set rngFound = rngToSearch.Find(What:=wks.Range("MatchThisCell"), _ LookAt:=xlPart, MatchCase:=False) If Not rngFound Is Nothing Then Worksheets("WorksheetToCopyFrom").Range("RangeToCo piedAndPasted").Copy rngFound.Offset(0, 1).PasteSpecial xlValues Else MsgBox myFind & " was not found" End If Range("A1").Select End Sub HTH "vipul" wrote: Hi, I have used a microsoft office spreadsheet 11.0 control in my userform.. All i need is a search from the active sheet, column search, then extract the matching cell row and paste the entire row in the spreadsheet control. How can I do it. Please give me the code. for multiple results, the sheet shud have all the matching results row in the control. thanks EggHeadCafe.com - .NET Developer Portal of Choice http://www.eggheadcafe.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform with spreadsheet control will not load | Excel Programming | |||
Control Sequence from Userform Control | Excel Programming | |||
Userform control | Excel Programming | |||
Userform control | Excel Programming | |||
UserForm Control | Excel Programming |