Dim strRange As String
Private Sub UserForm_Initialize()
Dim rcell As Range
strRange = Me.ListBox1.RowSource
Me.ListBox1.RowSource = ""
For Each rcell In Range(strRange)
ListBox1.AddItem rcell
Next rcell
ListBox1.AddItem "NotInList"
End Sub
When you wish to set the ListBox back to it's RowSource just use:
It was an oversight on my part not to mention that my dropdown list has 2 columns. This list is the name of banks with codes for each bank. I have the list in a1:b200 The codes run in alphabetical order, starting with A0:AZ for each branch of a particular bank and then on to B0 etc. in Column A and Column B has the bank description. The code makes the dropdown list blank. Is there any way to add the code and description of the bank without having to amend the list I have in another worksheet? The users that will be using this form will be at a different office - Overseas to be exact- so that means I will have to keep sending updated versions.
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.