LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Visual Basic: Combobox Complications

Alrighty, so I have this code to filter out a combobox and
it works! However there are some complications:

1) Some combo boxes require data from two worksheets from
the current workbook. What my does is filter the data
from the first worksheet, then process the filtering of
hte second worksheet. Then it adds this filtrated value
in the combo box. Can someone correct my code so that it
will obtain teh data from both worksheets, then filte? I
mean it's kind of annoying when it says something like

0
100
300
800
0
20
etc. ya know?

2) Despite the unfiltrated filtration =) my code makes my
combobox do something odd. If i were to play my code, the
firt time I click the combobox, the values appear fine.
However, when I click on the same combobox a second time,
it shows twice the data. And if I click it a third time,
it shows thrice the original data. Can someone help me
fix this problem so that no matter how many times i click
the combo box, it'll only show my data one?

Here is my filtration code:
For i = 1 To NoDupes1.Count - 1
For j = i + 1 To NoDupes1.Count
If NoDupes1(i) NoDupes1(j) Then
Swap1 = NoDupes1(i)
Swap2 = NoDupes1(j)
NoDupes1.Add Swap1, befo=j
NoDupes1.Add Swap2, befo=i
NoDupes1.Remove i + 1
NoDupes1.Remove j + 1
End If
Next j
Next i

Thanks a whole bunch anyone =)
 
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
Visual Basic cil Excel Discussion (Misc queries) 3 January 11th 10 04:27 AM
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual Basic mcp201 Excel Discussion (Misc queries) 0 June 23rd 08 05:05 PM
Visual Basic osaka78 Excel Discussion (Misc queries) 5 September 17th 07 01:21 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


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