Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
VETcalc
 
Posts: n/a
Default List Box with macro


I have 100 clients and store their data on one sheet.


Example: Client A's data would be located at b230:k254.

Client B's data would be located at b260:k284

I would like to develop a List Box that would contain all of my
clients.
Once a client is highlighted, I would like to press enter and have a
macro take me to the selected clients data.

Can someone please point me in the right direction to accomplish this
task.

Thanks,

Bob


--
VETcalc
------------------------------------------------------------------------
VETcalc's Profile: http://www.excelforum.com/member.php...o&userid=13078
View this thread: http://www.excelforum.com/showthread...hreadid=516899

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Richard Buttrey
 
Posts: n/a
Default List Box with macro

On Mon, 27 Feb 2006 10:14:34 -0600, VETcalc
wrote:


I have 100 clients and store their data on one sheet.


Example: Client A's data would be located at b230:k254.

Client B's data would be located at b260:k284

I would like to develop a List Box that would contain all of my
clients.
Once a client is highlighted, I would like to press enter and have a
macro take me to the selected clients data.

Can someone please point me in the right direction to accomplish this
task.

Thanks,

Bob


Probably several ways, but one that springs to mind is:

Create a unique list of your client names/codes and name the range say
"Clients"

In the RowSource property of the list box, enter the name "Clients"

I'm going to assume here that your data has the client name/code in
column A of sheet1. Change the code as necessary

In say the Click event of the ListBox, enter the following

Private Sub ListBox1_Click()
Dim stMyClient As String

stMyClient = UserForm1.ListBox1
Worksheets("sheet1").Activate
Range("a1").Select
Columns("A:A").Find(What:=stMyClient, After:=ActiveCell).Activate

End Sub

Hope this gives a general idea.





Richard Buttrey
__
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
VETcalc
 
Posts: n/a
Default List Box with macro


Richard,

Thank you!

Bob


--
VETcalc
------------------------------------------------------------------------
VETcalc's Profile: http://www.excelforum.com/member.php...o&userid=13078
View this thread: http://www.excelforum.com/showthread...hreadid=516899

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
multiple select from the drop down list in excel. list in one sheet and drop down in sriramus Excel Discussion (Misc queries) 5 October 27th 05 06:55 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM
Macro to shorten a list JGB Excel Discussion (Misc queries) 2 August 5th 05 10:31 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM


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

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"