Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default 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
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
Userform with spreadsheet control will not load Jeff Kraft Excel Programming 1 August 21st 06 03:26 PM
Control Sequence from Userform Control Nigel Excel Programming 3 December 29th 04 01:25 PM
Userform control ZMore Excel Programming 1 March 5th 04 11:34 PM
Userform control Phillips Excel Programming 1 November 20th 03 07:33 PM
UserForm Control John Wilson Excel Programming 0 July 16th 03 06:53 PM


All times are GMT +1. The time now is 07:53 AM.

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

About Us

"It's about Microsoft Excel"