Combobox With Variable ListFillRange

redneck345

New Member
Joined
Jul 16, 2011
Messages
11
I don't have any code experience. So I will attempt to explain as best I can.
I have a Combobox named "Combobox54" in a Excel 2003 Workbook on a worksheet named "Quote Worksheet".
I am trying to provide a ListFillRange (for Combobox54) which will have two possible Named Range Values RTFCLADRW or SIGDRW.
On another sheet (Sheet name = "Menu") I have a Named Range DRWBOXMENU that provides a value of either "1" or "0".
So if DRWBOXMENU equals 1, I want the ListFillRange value in Combobox54 to be SIGDRW otherwise (if the value is 0) I want the ListFillRange value to be RTFCLADRW.

I have tried this via formula in a cell on the menu sheet (to avoid programming) and I keep getting the #value error. I think I am going to need code to assign the value of the ListFillRange.

I have scoured the board looking for an example of my issue but, even if I found a match, I could not begin to generate the proper code. What I have realized is.....you people are absolutely AMAZING!
Can anyone help me out with the Code to do this?

Also....What are "Tags" referenced below this box?
Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Try this in the module for the Worksheet that contains your ComboBox:

Code:
Private Sub ComboBox54_DropButt*******()
    With ComboBox54
        If Worksheets("Menu").Range("DRWBOXMENU").Value = 1 Then
            .ListFillRange = "SIGDRW"
        Else
            .ListFillRange = "RTFCLADRW"
        End If
    End With
End Sub
 
Upvote 0
Hi Andrew,

Strange......I have to hit "run"...from the code window for this to "set" the menu.
Maybe I copied something in wrong?

Thanks
 
Upvote 0
HTML has garbled the first line. It should read without spaces:

Private Sub ComboBox54_DropButton C l i c k()
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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