ComboBox in AddIn>How to Set Rowsource?

I_AM

Board Regular
Joined
Jul 2, 2002
Messages
141
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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try this

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

GNaga
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,388
Messages
6,119,226
Members
448,878
Latest member
Da9l87

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