![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 67
|
Question:
does the code below(txtCode is the name of my combobox, strRowSource is the address of the Data in a column) stores the data in the combobox??? The code: With UserForm1.txtCode 'Clear old ListBox RowSource .RowSource = vbNullString 'Parse new one .RowSource = strRowSource4 '.AddItem = strRowSource End With Because when I chack the value with msgbox userform1.txtCode.Value it returns nothing Can someone please help me out Thanks in advance |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
I guess that depends of WHEN you're calling the .Value of the Combobox.
There's also a .Clear that clears everything out of the ComboBox. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Posts: 67
|
In my module, I have a Main sub:
Public Sub Main() SortAndRemoveDupes UserForm1.Show End Sub SortAndRemoveDupes is also in the same module which stores the data in the Combobox Then in my UserForm I have Private Sub SearchButton_Click() MainSearch Unload Me End Sub The code for MainSearh is in the module(not in userform). I uses the .Value in the MainSearch and it returns nothing. Where did I do wrong? Please help |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|