#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Userform

Hi,

I've got a userform in wich i've got a several listboxes of values you can
choose from, these values are coming from several lists (lets say; A1:A100
for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i would
like is that when I choose a value in listbox 1 that this value is not longer
available is this listbox, turns grey or something like that, so that it
cannot be choosen a second time.

For listbox 2 I would like the following, the contents of this listbox are
being used to fill out columns F and G. Listbox 2 contains a number sequence
(0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only octals). So
if number 77 is used to fill out column F and number 300 is used to fill out
column G, I would like to see not only these two numbers turn grey, but also
the numbers in between.

Any ideas?

Paul
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Userform

Private Sub ComboBox1_Change()
With ComboBox1
If .ListIndex = 0 Then
.RemoveItem .ListIndex
.ListIndex = -1
End If
End With
End Sub

The above only works if the control is not bound, in other words the list is
loaded into the control. Not by using the Control Source property
--

Regards,
Nigel




"Paul Tikken" wrote in message
...
Nigel,

Thanks for your reply. How can I make, that removing items by reference to
their index number, happen?

Cheers,

Paul

"Nigel" wrote:

You cannot selectively change the color of items in a ListBox. You can
remove items by reference to there index number.

--

Regards,
Nigel




"Paul Tikken" wrote in message
...
Hi,

I've got a userform in wich i've got a several listboxes of values you
can
choose from, these values are coming from several lists (lets say;
A1:A100
for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i
would
like is that when I choose a value in listbox 1 that this value is not
longer
available is this listbox, turns grey or something like that, so that
it
cannot be choosen a second time.

For listbox 2 I would like the following, the contents of this listbox
are
being used to fill out columns F and G. Listbox 2 contains a number
sequence
(0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only
octals).
So
if number 77 is used to fill out column F and number 300 is used to
fill
out
column G, I would like to see not only these two numbers turn grey, but
also
the numbers in between.

Any ideas?

Paul



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Userform

Thanks Nigel works like a charm!

Sorry for the late response, been away for a while!!

cheers,

Paul

"Nigel" wrote:

Private Sub ComboBox1_Change()
With ComboBox1
If .ListIndex = 0 Then
.RemoveItem .ListIndex
.ListIndex = -1
End If
End With
End Sub

The above only works if the control is not bound, in other words the list is
loaded into the control. Not by using the Control Source property
--

Regards,
Nigel




"Paul Tikken" wrote in message
...
Nigel,

Thanks for your reply. How can I make, that removing items by reference to
their index number, happen?

Cheers,

Paul

"Nigel" wrote:

You cannot selectively change the color of items in a ListBox. You can
remove items by reference to there index number.

--

Regards,
Nigel




"Paul Tikken" wrote in message
...
Hi,

I've got a userform in wich i've got a several listboxes of values you
can
choose from, these values are coming from several lists (lets say;
A1:A100
for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i
would
like is that when I choose a value in listbox 1 that this value is not
longer
available is this listbox, turns grey or something like that, so that
it
cannot be choosen a second time.

For listbox 2 I would like the following, the contents of this listbox
are
being used to fill out columns F and G. Listbox 2 contains a number
sequence
(0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only
octals).
So
if number 77 is used to fill out column F and number 300 is used to
fill
out
column G, I would like to see not only these two numbers turn grey, but
also
the numbers in between.

Any ideas?

Paul


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
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) Corey Excel Programming 2 January 9th 07 01:01 PM
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM


All times are GMT +1. The time now is 11:01 AM.

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"