Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ListBox - Row Source problem

It seems quite difficult to get an answer here... Anyway, anothe
question from me.. :P


My userform has a combobox and listbox. So, can I do such that, whe
the user choose their username in the combobox, the listbox wil
display onli the entries that the user made? and not display othe
users' entries?


Is it possible to do so?

Any help would be appreciated.
;

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default ListBox - Row Source problem

If you double click on the combobox, you will be taken to the combobox's
change event code. In that procedure, you can then do something like:

Private Sub ComboBox1_Change()
Dim I As Integer
Dim J As Integer
Me.ListBox1.Clear
I = Me.ComboBox1.ListIndex
If I -1 Then
'code that populates based on entry
'for example if the data is stored on a sheet
'named mydata
For J = 1 To 10
Me.ListBox1.AddItem Sheets("mydata").Cells(J, I + 1).Value
Next
End If
End Sub

Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"unplugs " wrote in message
...
It seems quite difficult to get an answer here... Anyway, another
question from me.. :P


My userform has a combobox and listbox. So, can I do such that, when
the user choose their username in the combobox, the listbox will
display onli the entries that the user made? and not display other
users' entries?


Is it possible to do so?

Any help would be appreciated.
;)


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ListBox - Row Source problem

Thanks a lot Bob Flanagan.

and I realize 1 thing... that is the rowsource for listbox must be
open workbook... It can't refer to the close workbook.

:

--
Message posted from http://www.ExcelForum.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
Listbox Problem browie Excel Discussion (Misc queries) 5 August 22nd 05 02:03 PM
Listbox problem browie Excel Discussion (Misc queries) 1 August 22nd 05 11:44 AM
ListBox problem Mike Fogleman Excel Programming 3 December 29th 03 12:23 PM
listbox.row source baha[_5_] Excel Programming 1 November 28th 03 08:30 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 05:47 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"