Combobox not store data

AllenL

Board Regular
Joined
Mar 14, 2002
Messages
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
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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
 
Upvote 0

Forum statistics

Threads
1,213,486
Messages
6,113,932
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top