![]() |
Search by rows and then go to selected row...in a frame?
Hi all,
I have an excel workbook that has a split frame in the middle of the page. The top has instructions and the bottom has a few hundred rows of data. I'd like to create a search function in the top frame that enables me to type a name, click a button (or hit enter), and have the bottom frame move to the appropriate row. I found some good code by Tom Ogilvy for returning a row as a result of a search (code below)...but I'm not sure how to move the focus of JUST the lower frame. Any help? Or even links to suggested reading? Thank you! Dave Code: (From Tom Ogilvy, as posted he http://www.microsoft.com/office/comm...=en-us&m=1&p=1 ) Dim rng as Range, rng1 as Range set rng = Cells.find(Userform1.Textbox1) if not rng is nothing then set rng1 = rng.entirerow End if |
Search by rows and then go to selected row...in a frame?
Thanks Tom! Will try it out later...but I'm sure it will work.
"Tom Ogilvy" wrote: Dim rng as Range, rng1 as Range set rng = Cells.find(Userform1.Textbox1) if not rng is nothing then set rng1 = rng.entirerow activewindow.Panes(2).ScrollRow = rng1.row End if -- Regards, Tom Ogilvy "Dave Linsalata" <Dave wrote in message ... Hi all, I have an excel workbook that has a split frame in the middle of the page. The top has instructions and the bottom has a few hundred rows of data. I'd like to create a search function in the top frame that enables me to type a name, click a button (or hit enter), and have the bottom frame move to the appropriate row. I found some good code by Tom Ogilvy for returning a row as a result of a search (code below)...but I'm not sure how to move the focus of JUST the lower frame. Any help? Or even links to suggested reading? Thank you! Dave Code: (From Tom Ogilvy, as posted he http://www.microsoft.com/office/comm...=en-us&m=1&p=1 ) Dim rng as Range, rng1 as Range set rng = Cells.find(Userform1.Textbox1) if not rng is nothing then set rng1 = rng.entirerow End if |
All times are GMT +1. The time now is 04:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com