ComboBox in AddIn>How to Set Rowsource?

I_AM

Board Regular
Joined
Jul 2, 2002
Messages
139
Hello,
I have an AddIn named "RvP.xla", with a userForm(1) containing a ComboBox(1).
The Addin has a sheet(1) with a range named
"Venue" = $C$6:$C$9
I wish to set the Rowsource of ComboBox1 to the above Addin/Sheet/Range.
How do I do this?
I have tried this,(and many many variations)

Sub UserForm_Initialize()
ComboBox1.RowSource = Sheets("RvP.xla") ("Sheet1!$C$6:$C$9").Value
End Sub
The above,and all my other variations, only produce errors.
Thanks Regards Ron
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
700
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Try this

ComboBox1.RowSource = "Sheet1!" & "$C$6:$C$9"

GNaga
 

I_AM

Board Regular
Joined
Jul 2, 2002
Messages
139
Thanks for that gnaga,
Unfortuantly this does not work either. Mr J.W in his book sujests the following: WorkBooks(Myaddin.xla").WorkSheets(1).Range("A1").Value
The above with the nessasary name changes does not work either.
There is no way I can doubt the word of Mr J.W
So is there any other factor outside the above sub with will effect it working?
Am at a total loss, (Dang, but it seems it should be the most simple of things!)
Any more sujestions will be gratefully received
Regards Ron
 

I_AM

Board Regular
Joined
Jul 2, 2002
Messages
139
Please Beleive me when I say, once again, I have given this my best shot.

I cannot for the life of me get the RowSource for ComboBox1, in UserForm1, in RvP.xla to Equal WorkBooks("RvP.xla").WorkSheets(1).Range("A1").Value/
(Rvp.xla being an installed addin, and my trying to access UserForm1 from another open WorkBook.)

The UserForm without the Rowsource Set, (ie the UserForm_Initialise() Sub deleted), diplays no problem at all. In fact before I saved it as an Addin, the comboBox Worked Well with the following Sub>

Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sheet1!A1"
End Sub

And also with this...

ComboBox1.RowSource = "Sheet1!" & "$A$1"

C/o GNaga(Thankyou)


Unfortuantly the above codes no longer work when I save all this as an addin.

I Have tried This....

Private Sub UserForm_Initialize()
ComboBox1.RowSource =WorkBooks("RvP.xla").WorkSheets(1).Range("A1").Value
End Sub

I Have tried all-sorts, and no snipet of code seems to to the trick.

If you are still with me down hear...thanks for your time thus far.
Any help in this will be gratefuly received and greatly appreciated.
Regards Ron.
 

Forum statistics

Threads
1,144,213
Messages
5,723,055
Members
422,476
Latest member
beck85

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