Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hmmm. Private Sub ComboBox6_DropButtonClick(). Should i have my code here ?
Private Sub ComboBox6_DropButtonClick()
I have just realised that EACH time i Click on the DropDownButtonClick Button, I get a Duplicate populated LIST if Clicked on more than ONCE. TO ONLY ever populate the LIST ONCE, where should i be placing the code ? It is on Userform5. The code is dependant upon other values chosen on the Userform, so it therefore cannot be placed in the Userform.Initialize or Activate event. Any Idea's, or am i stuck with it here ? Corey.... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hmmm. Private Sub ComboBox6_DropButtonClick(). Should i have my code here ?
Corey,
You can check if the combo has been populated. If ComboBox6.ListCount0 then exit sub NickHK "Corey" wrote in message ... Private Sub ComboBox6_DropButtonClick() I have just realised that EACH time i Click on the DropDownButtonClick Button, I get a Duplicate populated LIST if Clicked on more than ONCE. TO ONLY ever populate the LIST ONCE, where should i be placing the code ? It is on Userform5. The code is dependant upon other values chosen on the Userform, so it therefore cannot be placed in the Userform.Initialize or Activate event. Any Idea's, or am i stuck with it here ? Corey.... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hmmm. Private Sub ComboBox6_DropButtonClick(). Should i have my code here ?
Thanks Nick done a treat.
So .listcount identifies the number of time the list has been populated then. Learn something new every day. Cheers. Corey.... "NickHK" wrote in message ... Corey, You can check if the combo has been populated. If ComboBox6.ListCount0 then exit sub NickHK "Corey" wrote in message ... Private Sub ComboBox6_DropButtonClick() I have just realised that EACH time i Click on the DropDownButtonClick Button, I get a Duplicate populated LIST if Clicked on more than ONCE. TO ONLY ever populate the LIST ONCE, where should i be placing the code ? It is on Userform5. The code is dependant upon other values chosen on the Userform, so it therefore cannot be placed in the Userform.Initialize or Activate event. Any Idea's, or am i stuck with it here ? Corey.... |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Hmmm. Private Sub ComboBox6_DropButtonClick(). Should i have my code here ?
Corey,
No, it tell you number of items in the list. If it is 0 then you have populated with some item(s) ; .ListCount tells you how many items. I guess to delete the populate list code from the DropDownButtonClick event then, if you do not want it. NickHK "Corey" wrote in message ... Thanks Nick done a treat. So .listcount identifies the number of time the list has been populated then. Learn something new every day. Cheers. Corey.... "NickHK" wrote in message ... Corey, You can check if the combo has been populated. If ComboBox6.ListCount0 then exit sub NickHK "Corey" wrote in message ... Private Sub ComboBox6_DropButtonClick() I have just realised that EACH time i Click on the DropDownButtonClick Button, I get a Duplicate populated LIST if Clicked on more than ONCE. TO ONLY ever populate the LIST ONCE, where should i be placing the code ? It is on Userform5. The code is dependant upon other values chosen on the Userform, so it therefore cannot be placed in the Userform.Initialize or Activate event. Any Idea's, or am i stuck with it here ? Corey.... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Private Function Code Change | Excel Programming | |||
Private Sub Running Other Private Sub Inadvertently | Excel Programming | |||
Hmmm... Excel OVERRIDES vpagebreak and hpagebreak vb code???? | Excel Programming | |||
Hmmm... Excel OVERRIDES vpagebreak and hpagebreak vb code???? | Excel Programming | |||
Add code to Private Sub ComboBox1_Change() with a macro from a different workbook | Excel Programming |