rowsource field in properties

glennjrobertson1980

New Member
Joined
Mar 30, 2015
Messages
12
Hi,

Hope somebody can help me. I am using Excel 2007.

I am creating a userform, the only object on this userform is a combo box. When i click on the combo box in the properties within VBA I have RowSource i am completing this as I normally would with - 'sheet1'!B11:B16
when i click on the drop down for the combo box it shows the source data as it should.

I then have a macro on my spreadsheet that when clicked shows the userform.

However when the form loads there is no information in the combo box and when I go back into VBA and click on the combo box and look in properties the RowSource field has totally disappeared...

Please can somebody help.....
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
What happens if you set the RowSource in the userform Initlalize event?
Code:
Private Sub UserForm_Initialize()
    ComboBox1.RowSource = "'Sheet1'!B11:B16"
End Sub
Or use List instead.
Code:
Private Sub UserForm_Initialize()
    ComboBox1.RowSource = ""
    ComboBox1.List = Sheets("Sheet1").Range("B11:B16").Value
End Sub
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
Did you change ComboBox1 to the name of your combobox?
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
Where did you put the code?

It belongs in the userform module and will be triggered when the userform is loaded.
 

glennjrobertson1980

New Member
Joined
Mar 30, 2015
Messages
12

ADVERTISEMENT

This is where I am putting code is but I get a message saying.

Could not set the rowsource property. Member not found
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
If I create a userform, add a combobox, add the code I posted in the userform module I can't replicate any of the errors you describe.

Could you upload a sample file to a file sharing site like Box.net?
 

glennjrobertson1980

New Member
Joined
Mar 30, 2015
Messages
12
When I do this in Excel 2003 it works fine, its only when I do it in Excel 2007 is when I have the issue.

Also can't explain why the rowsource property box is actually disappearing form the properties menu with VBA
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
If you goto Tools>References... is anything marked as missing?

Does the code work if you try if you start over in a blank workbook? ie open a new workbook, add a userform, combobox etc
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,982
Messages
5,834,682
Members
430,310
Latest member
Excelorate3305

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
Top