Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select listbox item automatically


I hv 2 listboxes on userform..

If user is selecting the text of listbox1 then
get its index and select the text of listbox2(index of listbox1)
next also remove the selected item from both listboxes on clicking
remove btn.


--
ilyaskazi
------------------------------------------------------------------------
ilyaskazi's Profile: http://www.excelforum.com/member.php...o&userid=23969
View this thread: http://www.excelforum.com/showthread...hreadid=467414

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default select listbox item automatically

Private Sub cmdRemove_Click()
Range("A1").Offset(ListBox1.ListIndex).Delete
Range("B1").Offset(ListBox1.ListIndex).Delete
End Sub

Private Sub ListBox1_Click()
ListBox2.ListIndex = ListBox1.ListIndex
End Sub

This assumes that the source of the listboxes is A1:A10, B1:B10

--
HTH

Bob Phillips

"ilyaskazi" wrote
in message ...

I hv 2 listboxes on userform..

If user is selecting the text of listbox1 then
get its index and select the text of listbox2(index of listbox1)
next also remove the selected item from both listboxes on clicking
remove btn.


--
ilyaskazi
------------------------------------------------------------------------
ilyaskazi's Profile:

http://www.excelforum.com/member.php...o&userid=23969
View this thread: http://www.excelforum.com/showthread...hreadid=467414



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select listbox item automatically


Although i wanted the help for userform's listbox, it is solved takin
some similar codes

It is perfect as always, Mr Bob.. Thankyou

--
ilyaskaz
-----------------------------------------------------------------------
ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396
View this thread: http://www.excelforum.com/showthread.php?threadid=46741

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select listbox item automatically


i do not want to accept any item in listbox if it is already existing

show msgbox of already exis

--
ilyaskaz
-----------------------------------------------------------------------
ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396
View this thread: http://www.excelforum.com/showthread.php?threadid=46741

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
Adding item in listbox volabos Excel Worksheet Functions 0 December 3rd 07 11:47 AM
Item order in ListBox [email protected] Excel Discussion (Misc queries) 1 June 16th 06 01:15 PM
Add item to listbox, but only if it is not already there. Mark Excel Programming 4 September 2nd 05 10:07 PM
Select an item in a listbox using code Fred Jacobowitz Excel Programming 2 August 23rd 04 03:27 AM
The value of a ListBox Item TK Excel Programming 2 August 20th 04 06:17 AM


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